-
Notifications
You must be signed in to change notification settings - Fork 35
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
over elaborate __init__ files are a performance hinderance #410
Comments
You are so very right. The lazy loader should actually avoid pybullet from loading, it seems it's not working correctly :/ @jf--- what do you think? |
Confirming my pedantry is an invitation for moar 😉
I haven't checked that actually
a git submodule might make sense here? now ( compas 2.0 ) feels like a nice time to do so |
Regarding splitting the code to a separate repo and link with submodule, I think it would only make sense to spend that energy if we take the opportunity to let users choose which backends to install. However, I think this is not yet the right time. I think most compas_fab users are beginners into this field, otherwise they would interface with a backend directly, so focusing them to install all and thus going them easy access to try them all is a nice thing. Moreover each of our backends are not really fully featured yet. And it is much easier to develop / PR / review while keeping everything in one place. |
I have a small gripe with
compas_fab
over elaborate__init__.py
files.A specific example is
compas_fab/backends/__init__.py
All of the backends are loaded, where you're most likely using a single one at the time.
Now,
ROS
, theanalytic
solver andpybullet
are loaded even while its unlikely to use more one solver at the time.( FWIW, I'm working on the
tesseract
backend )Loading
pybullet
will take seconds to load... and in the case ofmacOs
pop-up a UI...So a huge amount of unnecessary code is loaded...
Finally, the
__init__
arguable could be just be an empty file, rather then the 166 lines it is now.The "hardcoded" ( dare I say Javaesque 👺 ) style of the current init files are also stylistically a little substandard of the usual finesse and elegance of the
compas_fab
codebase.( And then the irony of providing a
LazyLoader
incompas_fab.utils.lazy_loader
🧐 😉 )The text was updated successfully, but these errors were encountered: