kaitai-io / kaitai_struct_webide

Online editor / visualizer for Kaitai Struct .ksy files
https://ide.kaitai.io
GNU General Public License v3.0
278 stars 62 forks source link

WebIDE eats lots of (some GiB) RAM when a few MiB file is loaded there #41

Open KOLANICH opened 7 years ago

KOLANICH commented 7 years ago

Try https://github.com/kaitai-io/kaitai_struct_formats/blob/master/scientific/nt_mdt/nt_mdt.ksy with http://www.ntmdt-si.ru/data/media/files/scangallery/graphene_and_carbon_materials/graphene_2.mdt

On 2 GiB RAM system it causes browser and GUI going unresponsive because of swapping. Even if it is the result of a loop, I guess we need something to prevent this. For example webide can have some fields to limit amount of ram and stop parsing when the limit is hit.

P.S. python-compiled version works OK on that file.

julie-bsx commented 6 years ago

Take a look at #60 as I'm trying to get a similar issue resolved.