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

Investigate why building services-overview.svg takes so long #6

Open
SuperSandro2000 opened this issue Apr 7, 2024 · 2 comments
Open

Comments

@SuperSandro2000
Copy link
Contributor

I have a couple of hosts with each a couple of services. Building the derivation named services-overview.svg takes like 6 minutes on my host and is mostly busy with allocating memory but the process is not swapping. Maybe this is related to vercel/satori#590 ?

@oddlama
Copy link
Owner

oddlama commented Apr 7, 2024

I'm not entirely sure what's the cause of this, but I have had similar issues too. I feel like it started as soon as I added PNG images to my nodes, but I haven't investigated it yet so I might just be imagining this. What makes me a bit skeptic about the linked issue is that they are discussing times of around 1-2 seconds while our render takes minutes..

The html-to-svg nodejs app is definitely stuck at 100% CPU, and it really just calls satori directly. So unless the base64 encode takes ages it's pretty likely that this is somehow related to what satori is doing.

@nobodys-tools
Copy link

I encountered a similar issue with non-.svg images and managed to significantly reduce build times by resizing all images to 150x150 pixels.
I went from +5min to ~10sc (11 networks 24 devices/hosts and 50+ services, all with a custom image)

A potential workaround to address this problem is to automate the image resizing using a tool like ImageMagick.
Images could be resized to 150x150 pixels by default unless they are specifically designated for standalone display using nodes.<name>.renderer.preferredType="image". In such cases, a slightly higher resolution, such as 300x300 pixels, could be used.
(from what i can tell, the images seem to be limited to a maximum display size of 100x100 pixels in the rendered output anyway)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants