From: Milian W. <ma...@mi...> - 2008-08-27 20:34:23
|
Am Wednesday 27 August 2008 schrieb izua richard: > Excuse my ignorance, but isn't PHP using a garbage collector? Maybe he > actually *needs* all that memory. > Emmanuel, you could try invoking geshi at some earlier point in your > script. Sure, it won't solve your problem on the long term, and > something else might trigger the memory limit. And this will fail, of > course, if you load a 65MB file in memory to highlight :) Of course PHP has a garbage collector, but if you take this as an excuse for not taking memory usage into account _at all_ your code won't scale any good. Simple examples where "even" PHP leaks memory: for(;;) { create_function(...); } Or - and that I have seen _frequently_: $geshi1 = new GeSHi("", $lang1); $geshi2 = new GeSHi("", $lang2); ... $geshiN = new GeSHi("", $lang3); _no_ garbage collector will help you here. PS: Show me _any_ web application (not intranet!, not backend!) which requires 64MB of memory... Imo even 5MB is too much most of the times. -- Milian Wolff ma...@mi... http://milianw.de |