-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Slow integrations are hard to diagnose #4321
Comments
Yep, this is absolutely something we need to fix! Thanks for filing an issue. |
Not a one size fits all solution, but I just opened #4342 with a logger I had been working on for |
Agreed this is an issue! I'm thinking about a "Waiting for X integration..." log across all of our build hooks in case something takes longer than expected. Say, log on a 3 second timeout. PR coming shortly! |
Both fixes work fantastically, thanks! 🔥 |
I'm still finding my build time to be about 5 minutes. You can see that a large part of the build time is due to 6 images optimised by @astrojs/image.
|
Are those images gifs? I found sharp to be extremely slow at optimizing gifs, which is apparently a known issue. |
They're not gifs, but they are all on a remote server, so perhaps that's part of the issue. |
What version of
astro
are you using?1.0.5
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
npm
What operating system are you using?
Linux
Describe the Bug
Can we log when integrations are running?
I introduced a performance regression to my own Astro mdx remark plugin,
@altano/remark-astrojs-image
, that caused the@astrojs/image
integration to take ~100 seconds. The whole site seems to build in seconds but then it gets stuck for ~90+ seconds just sitting here, with no logging output:I can fix my plugin, but I'm a little concerned that an end-user might hit this and have a hard time diagnosing the problem. If it's a third-party integration that is misbehaving they won't even know. Using
--verbose
doesn't seem to give me any extra output that would help me diagnose what operation is taking so long.Simply having log output while awaiting the integration's
astro:build:done
hook should be sufficient.Link to Minimal Reproducible Example
n/a
Participation
The text was updated successfully, but these errors were encountered: