Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow context validation in componentsjs-compile-config to be skipped #55

Open
RubenVerborgh opened this issue Jul 20, 2021 · 5 comments
Assignees

Comments

@RubenVerborgh
Copy link
Contributor

Issue type:

  • 🐛 Bug

Description:

When working on CSS, we noticed that our validation script went from seconds to minutes between 3.x and 4.x:

componentsjs-compile-config urn:solid-server:default:Initializer -c config/default.json -f > /dev/null

Environment:

4.x

Crash log:

@github-actions
Copy link

Thanks for reporting!

@rubensworks
Copy link
Member

Yes, I'm aware of this (and this is intentional).

That's because of the type-scoped context functionality that is very expensive to handle according to the spec (background: rubensworks/jsonld-context-parser.js#34).
The expensive part of the algorithm is usually not needed, so it's disabled in most cases for Components.js.
However, I've decided to enable the expensive check when compiling a config, since this is usually not done so often.

(it used to run for much longer than minutes, so it has already been optimized a lot 😅 )

If needed, we can add a CLI param to componentsjs-compile-config to disable this check?

@RubenVerborgh
Copy link
Contributor Author

If needed, we can add a CLI param to componentsjs-compile-config to disable this check?

I'd love that. Thanks!

@RubenVerborgh
Copy link
Contributor Author

Another idea: in CSS, I would probably first do the fast check, and then the slow one, just as a smoke test.
Maybe that is interesting behavior too.

@rubensworks
Copy link
Member

For future reference, the internals are already in place to do this.
It's just a matter of adding the arg here:

@rubensworks rubensworks changed the title componentsjs-compile-config has massively slowed down Allow context validation in componentsjs-compile-config to be skipped Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants