-
Notifications
You must be signed in to change notification settings - Fork 555
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
Updated append method to keep an "_end" hint. Purpose is to address … #612
Conversation
…erformance problems for large lists
container = rest | ||
graph.add((container, RDF.first, item)) | ||
graph.add((container, RDF.rest, RDF.nil)) | ||
if graph.value(self._end, RDF.rest) == RDF.nil: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer (self._end, RDF.rest, RDF.nil) in graph
, which may also be slightly faster?
My gut feeling tells me there are some "cache invalidation" issues here, but since the code actually checks if
BUT - anyone who does this probably deserves everything coming to them :) Still, it would be a nightmarish bug to debug. |
Actually, thinking about it - another, easier way to mess up is to create two objects for managing the same collection. This raises the question - why don't we have a utility function on the graph objects for creating collections? Like we do for |
PR for #609 |
yupp, i see the same issues... #609 was about the constructor, while this PR in general tries to improve subsequent What about giving |
As detailed in the ticket, I fixed this with a safer addition of an |
…performance problems for large lists