Skip to content

Ability to save generated validator code #21

@NathanRSmith

Description

@NathanRSmith

Hi, I really like how performant Themis is after is generates the validators but, as we know, it can be quite slow in doing the actual generation. Would it be possible to get access to the generated code to save it separately as a pre-prepared validator? This would be very useful when schemas are all known ahead of time and change very slowly.

My immediate use case is for using Themis in the browser. It was simple to use Browserify to bundle it up, but it takes 6 seconds to generate all my validators EVERY TIME the page loads. This would be tolerable when starting a long running service, but is somewhat of a deal-breaker for the front-end. Caching generated validators in separate scripts would be a nice compromise for the cases when all schemas are known beforehand and the generation step could be put into an assert build pipeline.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions