-
Notifications
You must be signed in to change notification settings - Fork 11
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 of diff
#11
Comments
Hi Miserlou, thank you so much for your feedback. Honestly, I have a weak background on algorithms. But maybe this could be a possible starting point: :eprof.start_profiling([self()])
patch = Jsonpatch.diff(source, destination)
:eprof.stop_profiling()
:eprof.analyze() This was the result:
I highly suspect that the String handling is not the best. |
Nice! Great starting point. |
btw, if you're interested, this is how I'm using your library! https://github.com/Miserlou/live_json |
Nice, now I understand your demand for more performance. When I have some free time, I will spend it on performance improvements. |
💡 I think I discovered the origin of the performance issue. The path was always escaped for On my machine the time changed from ~900 to ~580. For comparison @Miserlou would you like to test the feature branch and check if the performance changed? Dependency should be
|
Yoooooo! This is awesome! Looks really good! It's interesting that it doesn't actually happen at the language level, seems like that'd be an easy performance improvement for anybody using If you publish a version bump I'll include it downstream! |
🙌 The version |
Hi, Corka! Excellent project!
I've been developing on top of this library and it performs very nicely, but I think it might end up being a bottleneck for some applications. I have compared it to other JSON diffing libraries and it seems to be an order of magnitude slower, however, it is the only good one I've found which is RFC 6902 compatible, which is a more important requirement.
So, I was wondering if there were any areas of the diffing algorithm which you think could do with speed improvement that you'd like me to take a look at to try to help speed up.
Cheers!
The text was updated successfully, but these errors were encountered: