Forums / SmartComponent Library - Developer Forum / Jenkins test stage slowed to a crawl.

Jenkins test stage slowed to a crawl.

3 posts, 0 answered
  1. Simon Prinsloo
    Simon Prinsloo avatar
    13 posts
    Registered:
    20 Feb 2019
    23 Oct
    Link to this post
    We just jumped roughty 14 months forward with our version of Smart Component Library (No Framework) from a version of August 2024.

    During that time, SmartUnit.cls was changed to use ClassAnnotationParser instead of the nowdeprecated XrefClassAnnotationParser. On Linux that means that the pure ABL ProparseAblApi is used, which seems to be quite slow.

    The impact of that on our CI pipeline is massive. Where our Test stage in Jenkins used to run between 4.5 and 7minutes, depending on how busy the hyper visor was, the stage now takes anything from 15 to 19 minutes.

    Is there a recommended way to resolve this, or at least achieve better speeds?

    One idea we can think of is to inherit from TestRunner.cls and register an instance of XrefClassAnnotationParser in the ServiceContainer, but we do not like the idea of reverting to a deprecated piece of code.

    Another option might be to implement a version of IProparseApi that build the AST only, as that appears to be all the test runner really needs, and register that in the ServiceContainer, but that also feels a bit ugly.
  2. Mike Fechner
    Mike Fechner avatar
    375 posts
    Registered:
    14 Sep 2016
    24 Oct in reply to Simon Prinsloo
    Link to this post
    Hi Simon,

    the pure-ABL Proparse engine is indeed what the ClassAnnotationParser uses on Linux, and a full parse of every test class is more than the test runner needs - it only reads the annotations in front of the CLASS statement and in front of the methods.

    We are going to add a lightweight annotation parser to SmartUnit that reads exactly that, without a full Proparse run, and make it the default on all platforms. The parser will be a regular service, so it can be replaced through the ServiceContainer - for the SmartUnit ANT task via the jsonConfigFile attribute, which hands a JSON session configuration (loadServices etc.) to the CCS compliant startup manager before the tests start:

    Common Component Specification (CCS):

    https://consultingwerk.atlassian.net/wiki/spaces/SCL/pages/8094588/Common+Component+Specification+CCS
    JSON Configuration File Format: https://consultingwerk.atlassian.net/wiki/spaces/SCL/pages/8094594/JSON+Configuration+File+Format

    SmartUnit and ScenarioRunner ANT Tasks: https://consultingwerk.atlassian.net/wiki/spaces/SCL/pages/888045569/SmartUnit+and+ScenarioRunner+ANT+Tasks

    Regards, Mike
  3. Simon Prinsloo
    Simon Prinsloo avatar
    13 posts
    Registered:
    20 Feb 2019
    25 Oct in reply to Mike Fechner
    Link to this post
    Hi Mike

    Thank you for the feedback. In the meantime, I implement a version of IProparseApi that build the AST only and while execution is still somewhat slower than the old way, it is now back in an acceptable range.

    Regards
    Simon
3 posts, 0 answered