Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InternalInnerText string concatenation to StringBuilder.Append #334

Merged
merged 1 commit into from Sep 30, 2019

Conversation

Tora-Bora
Copy link
Contributor

I got an issue with getting InnerText for large html, it just got stuck with huge memory consumption. I found that changing string to StringBuilder in this method solves the problem.

I got an issue with getting InnerText for large html, it just got stuck with huge memory consumption. I found that changing string to StringBuilder in this method solves the problem.
@Tora-Bora Tora-Bora changed the title string concatenation to StringBuilder.Append InternalInnerText string concatenation to StringBuilder.Append Sep 26, 2019
@JonathanMagnan
Copy link
Member

Hello @Tora-Bora ,

Thank you for the pull.

Yes, using StringBuilder will go make it faster for sure.

We will probably make it a little bit different and pass the StringBuilder in parameter to the InternalInnerText method to make it even faster.

We are a little bit busy at this moment and a lot of request for HAP are currently pending but we will try to make them all very soon.

Best Regards,

Jonathan


Performance Libraries
context.BulkInsert(list, options => options.BatchSize = 1000);
Entity Framework ExtensionsEntity Framework ClassicBulk OperationsDapper Plus

Runtime Evaluation
Eval.Execute("x + y", new {x = 1, y = 2}); // return 3
C# Eval FunctionSQL Eval Function

@JonathanMagnan JonathanMagnan merged commit 95782b8 into zzzprojects:master Sep 30, 2019
@JonathanMagnan
Copy link
Member

Hello @Tora-Bora ,

The v1.11.14 has been released.

As said, we did it a little bit differently to make sure we re-use the same StringBuilder instead of creating many instances.

Let me know if your memory consumption is now back to normal with the latest version.

Thank again for your pull ;)

Best Regards,

Jonathan

@Tora-Bora
Copy link
Contributor Author

Tora-Bora commented Sep 30, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants