You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The package is slow to import. This is bad because it affects the performance of CLI tools that rely on it, among other things. Import profiling (set -x PYTHONPROFILEIMPORTTIME 1) shows that most of the time is spent importing pydsdl._parser:
The package is slow to import. This is bad because it affects the performance of CLI tools that rely on it, among other things. Import profiling (
set -x PYTHONPROFILEIMPORTTIME 1
) shows that most of the time is spent importingpydsdl._parser
:Without further analysis I predict that the culprit is right here:
https://github.com/UAVCAN/pydsdl/blob/cb35ad3e8c0886d44facdfac14489b9ba7999d44/pydsdl/_parser.py#L140-L142
We parse the grammar definition at the time of package initialization. This is not great. Consider implementing lazy initialization:
The text was updated successfully, but these errors were encountered: