-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Closed
Labels
Description
three.js/src/renderers/WebGLRenderer.js
Line 652 in ecec267
| var geometryProgram = geometry.id + '_' + program.id + '_' + ( material.wireframe === true ); |
Instead of string concatanation in this line, _currentGeometryID, _currentProgramID and _currentWireframe variables should be defined and compared to the geometryId, programID and wireframeID seperately:
if (_currentGeometryID != geometryID || _currentWireframe != wireframe || _currentProgramID != programID){
updateBuffer = true;
// update _currentGeometryID, _currentWireframe and _currentProgramID variables
}
String concatanation causes GC activity since it creates a new string each time and this function is called on each frame. The GC activity caused by this line may be observed using Chrome's Allocation Profiler.
pailhead