-
Notifications
You must be signed in to change notification settings - Fork 16
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
Refactor refobj #441
base: main
Are you sure you want to change the base?
Refactor refobj #441
Conversation
I'm quite sympathetic to this idea, having experienced the significant time costs myself. I think that my key concern ends up being around the idea of the implementation of out-of-document objects via anonymous stubs. What would you think of changing from anonymous stubs to objects of a subclass with a name like |
3cf2a13
to
e2f4a5a
Compare
@bbartley we should merge main into this PR because two other PRs have been merged. One of the other PRs fixes the read-the-docs issue that is causing this PR's build to break. |
@tcmitchell go for it! this PR is at a stable point and the only thing failing is the read the docs. it would be great to see it go green |
This experimental feature branch aims to eliminate costly lookup operations. It was motivated by the fact that LabOP protocols, even relatively simple ones, start to bog down during protocol execution. Profiling showed that execution was getting bogged down by
lookups
andfinds
that take a long time to traverse over the Document tree. As the protocol executes, new objects are dynamically generated, making these document traversals ever more costly. Moreover, a conventional caching approach (e.g., Pythonfunctools
) was ineffective, as the lookups are predominantly performed on nascent, uncached objects.ReferencedObject
attributes have been refactored so that aReferencedObject
attribute will always return an object, not a URIReferencedObject
attributes always contain direct pointers to Python objects in memory; no document traversal is required to dereference the objectReferencedObject
refers to an external object not currently contained in theDocument
, a stubSBOLObject
is used instead