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

Performance Improvements to ElasticClient #9

Closed
yosiat opened this issue Oct 19, 2015 · 7 comments
Closed

Performance Improvements to ElasticClient #9

yosiat opened this issue Oct 19, 2015 · 7 comments

Comments

@yosiat
Copy link

yosiat commented Oct 19, 2015

Hi,

I have read the code of ElasticClient, and I have some tips to improve performance of indexing:

  • You are using .NET JavascriptSerializer, which is horribly slow and you are recreating it's instance every serialize (which clears it's internal cache), I recommend using Jil
  • Instead of using WebRequest (and it's ugly Begin/End async pattern), you can use HttpClient and execute PutAsync/PostAsync - from my tests, It handles concurrency pretty well.

I will submit a pull request on the weekend If I will have time.

@RichiCoder1
Copy link

We're just looking into this now. Agree with yosiat's points and will happily pick this up if needed :).

@urielha
Copy link
Owner

urielha commented Oct 23, 2015

Thaks @yosiat :)
Sounds very good.
I will try your offer ASAP.
But let me know if you currently working on pull request - I will be happy to apply it.

@yosiat
Copy link
Author

yosiat commented Oct 23, 2015

I currently don't have time to work on the pull request, maybe during the
next week.
On Oct 23, 2015 1:38 PM, "Uriel Hai" notifications@github.com wrote:

Thaks @yosiat https://github.com/yosiat :)
Sounds very good.
I will try your offer ASAP.
But let me know if you currently working on pull request - I will be happy
to apply it.


Reply to this email directly or view it on GitHub
urielha/log4stash#9 (comment).

@rostiar
Copy link

rostiar commented Jan 20, 2016

+1

@urielha
Copy link
Owner

urielha commented Jan 21, 2016

Unfortunately Jil is not supporting .NET4.0 and .NET3.5
I will check for another solution, or maybe till then Jil will be released also on those frameworks.

@yosiat
Copy link
Author

yosiat commented Jan 24, 2016

@urielha instead of Jil, you can checkout Newtonsoft.Json/ServiceStack.Json it will be much faster than JavascriptSerializer that comes with .net

@urielha
Copy link
Owner

urielha commented Apr 12, 2016

This issue was moved to urielha/log4stash#2

@urielha urielha closed this as completed Apr 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants