Explorar o código

split frames with >100k samples (bugfix for chrome preventing loading)

Nicolas Cannasse %!s(int64=3) %!d(string=hai) anos
pai
achega
ea8a1546dc
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      other/profiler/ProfileGen.hx

+ 5 - 0
other/profiler/ProfileGen.hx

@@ -175,6 +175,11 @@ class ProfileGen {
 					}
 					stack[i] = elt;
 				}
+				if( tcur.curFrame.samples.length == 100000 ) {
+					tcur.curFrame = new Frame();
+					tcur.curFrame.startTime = time;
+					tcur.frames.push(tcur.curFrame);			
+				}
 				tcur.curFrame.samples.push({ time : time, thread : tid, stack : stack });
 			} else {
 				var size = f.readInt32();