googlearchive / chromedeveditor

Chrome Dev Editor is a developer tool for building apps on the Chrome platform - Chrome Apps and Web Apps, in JavaScript or Dart. (NO LONGER IN ACTIVE DEVELOPMENT)
BSD 3-Clause "New" or "Revised" License
2.92k stars 413 forks source link

[Bower] Crash when attempting to "bower update" packages larger than 200MB #3408

Open kennystrawnmusic opened 10 years ago

kennystrawnmusic commented 10 years ago

There's one package in particular that is especially problematic, crashing the Dev Editor about halfway through the download... I'm guessing the sheer size of the package is causing the Dev Editor to run out of memory.

So, if an update to the Dev Editor can be issued to correct this problem (chrome.system.memory.getInfo to query the available memory would be a start, then maybe focus on compressing those large files to fit), it would be highly welcomed.

ussuri commented 10 years ago

Thanks for reporting! We'll fix this somehow.

ussuri commented 10 years ago

To explain a little bit and to document the plan for myself.

In the code, we have 2 ways to fetch Bower packages from their GitHub repos: using our own implementation of git clone or downloading a GitHub-zipped copy of the package and unpacking it. We've switched 100% to the latter at some point because of speed benefits. However, the in-memory unzipping apparently can break on very large packages. So I'm guessing that if we just fall back to git-cloning when the size exceeds a threshold, that will solve the problem.

mralext20 commented 10 years ago

a short term solution to this is to manually use bower in the directory and run bower update to update.

ussuri commented 10 years ago

An update: I've tried using our current git implementation, and it runs out of memory as well :( We're working on the integration of the NaCl-based git port right now: hopefully that will provide an ultimate solution. As of today, this is sadly unsolvable, so I'm moving it to the next release.

ussuri commented 9 years ago

One more update: a NaCl-based git implementation is more-or-less here, and I'll try switching Bower to use it as soon as it's 100% ready. Hopefully it will finally resolve this problem.