Spomky-Labs / pwa-bundle

PHP library for generating a full featured PWA manifest

Home Page:https://pwa.spomky-labs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Significant initialization time

tacman opened this issue · comments

Version(s) affected

1.2.x

Description

I noticed my page initialization times going from 500ms to over 2000ms with pwa-bundle. Removing the bundle brings the times down again.

Even when the bundle was disabled I had higher initialization times.

I don't think I have any expensive listeners installed.

I can check in a demo repo if you're not experiencing this.

How to reproduce

Look at the debug toolbar performance tab before and after installing pwa-bundle.

Possible Solution

No response

Additional Context

No response

Hello,

I am investigating this issue. It looks like the listener that is serving dev files is slow.
No issue on production env.
2024-06-01_20h04_15

Yeah, maybe add an option to selectively disable it? It was slowing down my admin pages, which don't even use the PWA, to the point that I uninstalled it while working on them.

No need to selectively. I optimized using lazy loading and the compilation time reduced from 97ms to 1.9ms (and half the memory by the way).
The profiler loading time is now 47ms instead of 67.2ms.
I'll push an update in a couple of minutes.
2024-06-02_10h59_18

yep, much better now with 1.2.1, thanks!!

Perfet! Many thanks for your feedback.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.