Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak of demo5 - boreal sky #3

Open
ZXYCir opened this issue Feb 15, 2019 · 8 comments
Open

Memory leak of demo5 - boreal sky #3

ZXYCir opened this issue Feb 15, 2019 · 8 comments

Comments

@ZXYCir
Copy link

ZXYCir commented Feb 15, 2019

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
Copy link

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
Copy link
Owner

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
Copy link
Author

ZXYCir commented Feb 18, 2019

@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

  • Microsoft DirectX* *
    Runtime Version: 12.0
    Hardware-Supported Version: 12.0

  • Devices connected to the Graphics Accelerator *

Active Displays: 1

  • Built-in Display *

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

  • Other names and brands are the property of their respective owners.

@Jeremboo
Copy link
Owner

Jeremboo commented Feb 24, 2019

@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:

while (a < aMax) {
a += 0.2;
y -= incrementation;
origin.set(radius * Math.cos(a), y, radius * Math.sin(a));
direction.set(-origin.x, 0, -origin.z);
direction.normalize();
raycaster.set(origin, direction);
// save the points
const intersect = raycaster.intersectObject(sphere, true);
if (intersect.length) {
points.push(intersect[0].point.x, intersect[0].point.y, intersect[0].point.z);
}
}

@ZXYCir
Copy link
Author

ZXYCir commented Feb 25, 2019

@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
Copy link
Owner

Jeremboo commented Mar 2, 2019

@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
Copy link
Author

ZXYCir commented Mar 4, 2019

@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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants