Jeremboo / animated-mesh-lines

Tutorial and demos for Codrops about how play with the THREE.MeshLine library
720 stars 107 forks source link

Memory leak of demo5 - boreal sky #3

Open ZXYCir opened 5 years ago

ZXYCir commented 5 years ago

Opening this demo,and I found that my PC's memory went full very quickly。So,what's happening? I use windows 10 and chrome or IE。

douchuan commented 5 years ago

Opening this demo,and I found that my PC's memory went full very quickly。So,what's happening? I use windows 10 and chrome or IE。

mac ok, but mem increase quickly on pc

Jeremboo commented 5 years ago

Hey @ZXYCir and thanks for your feedback.

Demo 5 is the only one demo who use postprocessing to add the bloom effect. Bloom effect allocate a lot of temporary memory and it may be the origin of your full memory.

What is your PC's config? (your RAM, graphic card, processor...).

You can check the bloom effect used here: https://vanruesc.github.io/postprocessing/public/demo/#bloom

ZXYCir commented 5 years ago

@Jeremboo, thanks, and I open https://vanruesc.github.io/postprocessing/public/demo/#bloom,all the demo is ok, no memory problems , no other problems.
I paste Intel(R) UHD Graphics report here, “ Intel(R) UHD Graphics 620

Report Date: Monday, February 18, 2019 Report Time [hh:mm:ss]: 11:01:29 AM Driver Version: 22.20.16.4771 Operating System: Windows* 10 Home China (10.0.17134) Physical Memory: 16268 MB Vendor ID: 8086 Device ID: 5917 Device Revision: 07 Graphics Output Protocol (GOP) Version: 9.0.1068 Current Resolution: 1920 x 1080

Processor: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz Processor Speed: 1992 MHz Processor Graphics in Use: Intel(R) UHD Graphics 620 Shader Version: 5.1 OpenGL Version: 4.5 OpenCL Version: 2.1 Vulkan* Version: 1.0.38

Active Displays: 1

Display Type: Digital DDC2 Protocol: Supported Gamma: 2.2 Connector Type: Embedded DisplayPort Device Type: Built-in Display

Maximum Image Size Horizontal Size: 13.39 inches Vertical Size: 7.48 inches

Supported Modes 1920 x 1080 (60p Hz) 1920 x 1080 (48p Hz)

Raw EDID: 00 FF FF FF FF FF FF 00 09 E5 47 07 00 00 00 00 12 1B 01 04 A5 22 13 78 02 1B BB A6 58 55 9D 26 0E 4F 55 00 00 00 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 9C 3B 80 36 71 38 3C 40 30 20 36 00 58 C2 10 00 00 1A FD 2D 80 0E 71 38 28 40 30 20 36 00 58 C2 10 00 00 1A 00 00 00 FE 00 42 4F 45 20 43 51 0A 20 20 20 20 20 20 00 00 00 FE 00 4E 56 31 35 36 46 48 4D 2D 4E 36 31 0A 00 30

Jeremboo commented 5 years ago

@ZXYCir your Graphics card seems to have good capacities...

To be sure that is not because of the postprocessing, can you try to comment on these lines :

If you still have the issue, it's probably because of the raycasting method to grab the point positions. See it here: https://github.com/Jeremboo/animated-mesh-lines/blob/2c4f2777406907015e8bdafe13948a6991890d37/app/demos/demo5/index.js#L100-L113

ZXYCir commented 5 years ago

@Jeremboo the problem is truly because of the raycasting method to grab the point positions, L109-112,I did tests at 3 more PC with windows system, it was recurrent。

Jeremboo commented 5 years ago

@ZXYCir Now we find the issue point, let's find a solution!

Have you already try something to fix that? Like save the intersect object into a variable who is already instanced. Or limit the number of raycasting to do?

Can you use the Chrome dev tools to analyze the runtime performance and figured out what exactly appends?

https://developers.google.com/web/tools/chrome-devtools/rendering-tools/

ZXYCir commented 5 years ago

@Jeremboo, I tried all I could do at the beginning, including the memory tools of chrome,but I hadn't fixed that problem,so I made this issue. And I found that in iphone(x,6,7,8) is recurrent.

pitervela commented 1 year ago

Hello Thanks for this cool project, It waas really helpful for me! But I noticed error to run this project.

THREE.MeshLine.js:81 Uncaught TypeError: g.getAttribute is not a function