13

I use webgrind, and it produces large amounts of cache files.

How do i automatically clear those files after the server closes or something like that. I use WAMP installation on a windows7 machine.

It may sound silly, But i am not sure how to disable webgrind temporarily on wamp. Also does webgrind add considerable overhead while executing scripts?

PS: webgrind is used interchangble with xdebug in the above statements.

footy
  • 5,803
  • 13
  • 48
  • 96

1 Answers1

23

Yes, xdebug profiling adds some overhead to execution.

In your php.ini (or xdebug.ini) file, set:

xdebug.profiler_enable=0

xdebug.profiler_enable_trigger=1

Now cachegrind files will only be generated when you GET/POST with a parameter, or send a cookie, with the name XDEBUG_PROFILE.

Example: http://yoursite.com/yourscript.php?XDEBUG_PROFILE=1

Reference: http://www.xdebug.org/docs/profiler

mh.
  • 802
  • 1
  • 7
  • 20
  • 1
    I had my server break twice with disk full because of these huge tmp files I had enabled inadvertently. Maybe there should be some warning about this in the php.ini file. It doesn't look dangerous. It doesn't blow up immediately, only months later. Ouch. – pgr Mar 21 '16 at 14:19
  • after these changes, can you "flush" these files to make them smaller? – morne May 03 '16 at 13:02