mrdoob / three.js

JavaScript 3D Library.
https://threejs.org/
MIT License
101.77k stars 35.3k forks source link

firefox allocation size overflow editor publishing 1,5m+ polygons #9187

Open ThomasPahler opened 8 years ago

ThomasPahler commented 8 years ago
Description of the problem

allocation size overflow when publishing a scene frome editor with over 1,5 million polygons, 1,1million still works fine

allocation size overflow Menubar.File/<() Menubar.File.js:221 bound () self-hosted:752 Menubar.File.js:221:12

Three.js version
mrdoob commented 8 years ago

Yeah... Working on that...

ThomasPahler commented 8 years ago

here (http://www.unmht.org/forum/en/5108.html) someone said that "Firefox's JavaScript engine can handle up to 256M chars per each string", might be the problem here, so it had to be splitted or reduced in some way. i noticed that the scene export still works, maybe it just has a higher limit?

ghost commented 8 years ago

allocation size overflow when publishing a scene frome editor with over 1,5 million polygons, 1,1million still works fine

Anything above 1 million polygons in a browser is a bad idea from many points of view. You need to learn how to optimize your stuff. Lower poly and "smart" textures is the key to success.

makc commented 8 years ago

i noticed that the scene export still works, maybe it just has a higher limit?

that's because of commit 35e5c70

MatejJan commented 8 years ago

Anything above 1 million polygons in a browser is a bad idea from many points of view. You need to learn how to optimize your stuff.

That's not an answer for everyone. I'm using THREE.js for scientific visualization in a videowall center with multiple Quadro graphics cards that can easily handle huge polygon counts. It shouldn't be a show-stopper then with loading.

zhanghaidi commented 1 year ago

Yes, this issue has nothing to do with thee.js rendering. It seems to be related to the memory limit of the jsV8 engine. Can I choose a scheme for batch export based on objects?

makc commented 1 year ago

perhaps something like this could help here, but then you would need your own replacement of fflate.strToU8 to make a normal array (that you could grow) instead