WARP-LAB / files_3dmodelviewer

3D Model Viewer for Nextcloud
GNU Affero General Public License v3.0
36 stars 6 forks source link

Poor performance on large files #8

Closed ershovdz closed 1 year ago

ershovdz commented 1 year ago

Poor performance when open the attached obj file. Opening file takes too much time and memory. But if I open the same file in https://3dviewer.net/# it opens very fast. Penthouse.zip

kroko commented 1 year ago

Confirmed

After second check it seems that https://3dviewer.net/ behaves slow for this model too, both by uploading Penthouse-org.obj as well as passing it as URL, thus your premise IMHO actually does not stand. I used browser in no cache mode to validate (but did not quantise my observation, just subjective feel for timing and behaviour).

Here are CORS'ed versions that can be loaded in 3dviewer.net via Open from URL promt

Other 3D viewers choke on your file too.

OBJ weighting 54MB means huge tree. Autodesk case hints though that there might be some internal representation tricks.

Needs more investigation, but maybe this case just represents limits on what JS / WebGL 2 (no WebGPU at this point) on top on Three.js can do.

ershovdz commented 1 year ago

Just to make it clear. My configuration: Windows 11 22H2, Nvidia 3060, 32 Gb Ram, CPU Amd Ryzen 5800H. I use this url to open in browsers for 3dviewer: https://3dviewer.net/#model=https://bucket.cdn-d01.warp.lv/user-ershovdz/Penthouse-org.obj Clear cache in browsers. Open url. Chrome (latest version): 10 seconds and 900 Mb ram Firefox (latest version): 15 seconds and 800 Mb ram

I use this url for nextcloud app files3dmodel viewer for the same file: http://localhost:8080/apps/files/?dir=/&openfile=4893 Clear cache in browsers. Open url. Chrome (latest version): 19 seconds and 3000 Mb ram Firefox (latest version): didn't wait for opening (more 90 seconds) and it took 5000 Mb of ram firefox

https://fetchcfd.com/3d-viewer opens this file for only 4 seconds and use only 900 Mb in Chrome !

ershovdz commented 1 year ago

Looks like I've found the root cause. Just remove this line: https://github.com/WARP-LAB/files_3dmodelviewer/blob/36acc7ec304123c4378ccc47d09b32516ea29627/src/js/App/App.mjs#L58 It's disable vue reactivity for viewer.

kroko commented 1 year ago

note to myself: @AbsolutePhoenix in https://github.com/WARP-LAB/files_3dmodelviewer/issues/12 has found that it happens above 16MB mark for STL files.

kroko commented 1 year ago

@ershovdz please try 0.0.11 with your Penthouse.zip

kroko commented 1 year ago

if the issue persists, please report and i will reopen this ticket.