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

[polyserve] Serving extremely slow on sinon package bundle #538

Closed
TimvdLippe opened this issue Jun 24, 2018 · 2 comments · May be fixed by gcloud-lerralice/tools#28, Exnadella/tools#70, Exnadella/tools#84 or Exnadella/tools#120
Assignees

Comments

@TimvdLippe
Copy link
Contributor

Serving the sinon.js bundle with polyserve is extremely slow (>12 seconds).

To reproduce:

  1. Check out branch fix-audit-wct-browser-legacy
  2. Install the dependencies per usual instructions
  3. Run polymer serve in the root of this repository
  4. Open http://127.0.0.1:8081/components/polymer-tools/packages/wct-browser-legacy/node_modules/sinon/pkg/sinon.js (check your port)
  5. Observe that loading this particular file is extremely slow

Even when running with polymer serve --compile never, it remains slow. Note that other files (for example http://127.0.0.1:8081/components/polymer-tools/packages/wct-browser-legacy/node_modules/sinon/History.md) are instantly loading. Also note that after you refresh the file, it is instant again.

This leads me to believe that there is a performance issue with reading/writing ASTs to files on first load.

This issue is blocking the migration of #533

@usergenic
Copy link
Contributor

polyserve and polymer serve should probably have an exclusion list for middleware that just enables pass-thru of the files which could sidestep the issue. I'll have a go at that feature; its come up several times before and I think there's even some hardwired cruft in polyserve that already passes-thru a couple files by string-matching.

@TimvdLippe
Copy link
Contributor Author

@usergenic Awesome, thanks for the pointer! I went ahead and opened #543, which fixed the issue for me. Back to tracking the WCT issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment