vanng822 / go-solr

Solr client in Go, core admin, add docs, update, delete, search and more
MIT License
69 stars 42 forks source link

Major change is parsing framework for speed #36

Closed djinn closed 8 years ago

djinn commented 8 years ago

redesigned data movement from connection.Resource to parser Json parsing is delayed additionally new parser does not parse Document reducing parse time

djinn commented 8 years ago

I have setup two benchmark tests one for StandardResultParser and second for FireworkResultParser. Standard Parser is eager parser and Firework essentially expects user code base to have document parsing which has several benefits. I am pasting results from my system.

 BenchmarkStandardResultParser-4    20000             93631 ns/op
 BenchmarkFireworkResultParser-4    30000             42788 ns/op
 ok      _/Users/ss/eproj/go-solr/solr   4.615s  

Notice Firework has serious performance improvement.

vanng822 commented 8 years ago

Great @djinn , I will take a look.

One thing is that if this will break old code?

vanng822 commented 8 years ago

Alright, if you don't have anything else in mind then I merge @djinn

djinn commented 8 years ago

Yes please

On Wed, 13 Jan 2016 01:37 Nguyen Van Nhu notifications@github.com wrote:

Alright, if you don't have anything else in mind then I merge @djinn https://github.com/djinn

— Reply to this email directly or view it on GitHub https://github.com/vanng822/go-solr/pull/36#issuecomment-171005446.

vanng822 commented 8 years ago

Thank you @djinn Great job! Hope that this will help many people