Error 502 randomly occurs when the project is shared

Hello I’m a P5.js newby…I developed 4 years ago a processing program and moved it to p5.js. It loads and works fine in the preview window. My problem occurs when I share the program, the program loading time increase randomly and create time out error. Here after the 2 cases:
-1st case: “about:blank” appears during 30s and next the program shows up . It’s OK.
-2nd case: “about:blank” appears during 59s and next “Error 502 occurs”.

Here after my questions:
-Why the preview program is much faster to load than the shared program?
-Why the time to load the program can move from 30s to 59s?
-Some tips to reduce the load time? There are a lot of global Variables/Arrays, image…

Thanks a bunch
/Pascal

Hi @paco06 – I hope that you were able to resolve your problem.

Usually there is no way to answer such questions unless you share your code – and/or a link to your code – and explain what you mean by “export” when you export it.