Skip to content

[QUESTION, VSCode] How to optimize loading of custom python libraries? #507

@Noordsestern

Description

@Noordsestern

Relates to #505

Please describe.
I am uncertain, if it is a bug, feature or a question. I put it as a question here for public tracing.

I have a project with a custom library that only roughly has 30 keywords - but many dependencies. In VSCode, opening a suite that references that library leads to LIBRARY_LOAD_TIMEOUT (just as described in #505), due to the amount of module imports.

It's not an issue of heavy constructors. The contructors of libraries are cheap, it's the imports that somehow eat a lot of time during library loading.

** Observation **

  1. Executing the test suite with robot or robotcode does not lead to obvious delays. Execution time seems rather normal.
  2. The library has been implemented as dynamic library. Transforming it in static library seemed to have optimized the loading time a bit, but it still is a lot and leads to delays of several minutes before the VSCode plugin can properly work (note: several minutes only work, when using [ENHANCEMENT] Publish LOAD_LIBRARY_TIME_OUTas environment variables #505)
  3. There is a huge .resource file importing many custom libraries instead of adding all libraries individually to each test suite.

Desktop (please complete the following information):

  • Python Version 3.13
  • RobotFramework Version 7.3.2

I find it hard to pinpoint the root cause. Is it normal behaviour in Python? Is it a Robot Framework parsing thing? Is it Robotcode? Should the custom libraries or resource files be organized differently?

Any idea?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions