st2 icon indicating copy to clipboard operation
st2 copied to clipboard

Research improving jsonschema validation performance

Open Kami opened this issue 4 years ago • 2 comments

Right now, JSON schema validation is quite slow.

This is primarily noticable when registering a pack with a lot of resources / actions.

To put things into context - with my action performance registration improvements from https://github.com/StackStorm/st2/pull/4846#issuecomment-787050508, it now takes around 40 seconds to register all the actions from the aws pack. Out of those 40 seconds, 15-20 are spent on JSON schema validation.

We should look into options such as https://horejsek.github.io/python-fastjsonschema/.

Right now we utilize / rely on some of the jsonschema library internal API which means that the change likely won't be just drop in and replace and will require some (perhaps non-trivial amount of) work.

See https://github.com/StackStorm/st2/pull/4846#issuecomment-787050508 for some more context and details.

Kami avatar Feb 27 '21 17:02 Kami

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically marking is as stale. If this issue is not relevant or applicable anymore (problem has been fixed in a new version or similar), please close the issue or let us know so we can close it. On the contrary, if the issue is still relevant, there is nothing you need to do, but if you have any additional details or context which would help us when working on this issue, please include it as a comment to this issue.

stale[bot] avatar Jun 02 '21 17:06 stale[bot]

We are also maintainers of the flex library, which is otherwise abandoned. This should help us move off of that as well.

blag avatar Jun 02 '21 19:06 blag