-
Notifications
You must be signed in to change notification settings - Fork 64
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 #87
Comments
So how much of a difference did the first pass make at improving performance? Idk if it'd make much of a difference, but you're using arrays, and searching the entire array each time for a previously visited reference. Unless you limit the depth of the circular relationship, this will become the slowest aspect I think, and predictably so...I'm not entirely sure, but could using a Javascript object as a map, keyed by Also, does limiting the traversal depth help here? or making it configurable maybe? Eventually you have to stop evaluating a circular dependency, I'm just wondering what your stopping point is. |
The real problem is processing the same documents and references more than once. I've solved this locally. The other problem is the approach taken to identify circular references and for resolving the references. Instead of finding all references and working out if they are circular or not, I need to process each reference once, identify its dependencies (what other referenceable objects are below the referenced object), resolve references as they are encountered and use simple logic to identify circulars after the fact. I've got it all figured out, and most of it worked out locally. I just need to finish the work. |
The resolver was rewritten to fix numerous bugs and performance issues. The reason for this is over the years, bug fixes and features have been added on top of json-refs and its resolver logic has become crufty. The new rewrite is clean, does not reinvent the wheel and fixes many bugs. Fixes: #80, #87, #88, #89, #97, #101, #103
The resolver was rewritten to fix numerous bugs and performance issues. The reason for this is over the years, bug fixes and features have been added on top of json-refs and its resolver logic has become crufty. The new rewrite is clean, does not reinvent the wheel and fixes many bugs. Fixes: #80, #87, #88, #89, #97, #100, #101, #103
Fixing issue #82 was a brute force attempt. With all the feature adds and bug fixes, it's time to revisit performance.
The text was updated successfully, but these errors were encountered: