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

Should --warm option also trigger onload callbacks #2839

Closed
philippjfr opened this issue Oct 20, 2021 · 1 comment · Fixed by #2844
Closed

Should --warm option also trigger onload callbacks #2839

philippjfr opened this issue Oct 20, 2021 · 1 comment · Fixed by #2844
Labels
type: enhancement Minor feature or improvement to an existing feature
Milestone

Comments

@philippjfr
Copy link
Member

The --warm option is helpful in warming up a server by running imports and populating potential caches before the first user hits the application being served. Currently it simply creates a fake session causing it to load, however for many apps expensive calculation may occur behind an onload callback, i.e. so it only executes after the page is rendered. Since the fake session never receives an event that says the page has rendered any logic behind the onload callback is never executed and therefore isn't "warmed up". So as a policy question should the warm option also trigger any onload events?

@philippjfr philippjfr added type: discussion Requiring community discussion TRIAGE Default label for untriaged issues and removed TRIAGE Default label for untriaged issues labels Oct 20, 2021
@jbednar
Copy link
Member

jbednar commented Oct 20, 2021

As a user, if I've gone to the trouble of specifying --warm I'd want as many things warmed as possible. It's true that sometimes there are actions on rendering a page that aren't quite kosher to perform if not actually displaying the page to a user. E.g. if an app is counting the number of visitors, the warming will now make that count off by 1. Still, because users don't have to use --warm if they don't like what it does, I do think it's best to execute whatever could practically be executed.

@philippjfr philippjfr added this to the v0.12.5 milestone Oct 21, 2021
@philippjfr philippjfr added type: enhancement Minor feature or improvement to an existing feature and removed type: discussion Requiring community discussion labels Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Minor feature or improvement to an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants