question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Super super super slow to create Zip files

See original GitHub issue

I have 20+ small functions.

esbuild: {
  packager: 'npm',
  bundle: true,
  minify: false,
  sourcemap: false,
  treeShaking: true,
  nativeZip: true, // 👈 this helps a little but still very slow - in fact without it it mostly fails but with no meaningful error
  concurrency: 10, // 👈 makes no difference
  external: ['migrate-mongo', 'pdfkit', 'pdf-lib', 'jsonwebtoken'],
}

Running on a Mac:

image

Any ideas?

I’ve also noticed that the generated Zip files are all the same size - this seems weird but it looks like it’s putting everything in the Zip. Am I missing something here?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
samchungycommented, Nov 29, 2021

Good find! That might be related to how we find the entry points since we have to grab the function by splitting

eg. function1.handler means we need to grab the function1 file. So I think we may need to adjust how we find that to allow for the ./ operator.

1reaction
chearmstrongcommented, Nov 29, 2021

@samchungy I’ve found the issue. I haven’t drilled in to the exact reason, but understand why.

My handler paths are defined with ./ at the start - this caused all the files to be bundled. Removing that solves the issue and only the required file is bundled in the Zip.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does WinZip unzip files extremely slowly? - Jozsef Torsan
A reason of the extremely slow unzipping on Windows can be Defender that runs in the background and scans each file. This usually...
Read more >
Extracting files from zipped folder is very slow
While extracting the files from the zipped folder, the speed is only 5-6 KBps and shows that it'll take more than 8 hours....
Read more >
Java Create 100MB zipped csv file performance issue
It appears that there's a little bit of an overhead with using Super CSV (~122%), but just writing to a zip file almost...
Read more >
Why Does WinZip Unzip Files So Slowly? (Solved!)
In most cases, this is because the file type you're working with is compressed as much as it can be before you even...
Read more >
Unzipping software too slow to unzip? Try This Solution!
Issue: Unzipping software, like WinZip, unzips files too slowly. The problem has to do with the Attachment Manager in Microsoft Windows.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found