in reply to Re^3: Perl Debugger degrades performance when reading large spreadsheet
in thread Perl Debugger degrades performance when reading large spreadsheet

I would do that too if I had any idea what you mean :)

Could you give me an example of what you mean by modifying the callback?
I like the idea of altering DB::sub
Since I have not clue what I'm doing, I tried deleting all the spreadsheet subs using:

map {delete $DB::sub{$_}} grep {/spreadsheet/i} keys %DB::sub
The first time I ran after that, it saved me 10 seconds,
but that wasn't repeatable, and I'm pretty sure it had no effect at all.
because its way after all the subroutine calls get replaced with the call to &DB::sub(args)

I'm going to punt on this because I think I've already wasted more time than I'll ever recover :)
But thanks for your help!

  • Comment on Re^4: Perl Debugger degrades performance when reading large spreadsheet
  • Download Code

Replies are listed 'Best First'.
Re^5: Perl Debugger degrades performance when reading large spreadsheet
by LanX (Saint) on Aug 31, 2021 at 13:32 UTC
    I was talking about &DB::sub() the function

    the debugger will call it for every function call and theoretically it should be possible to temporarily change some flags only for your spreadsheet calls.

    see also the flags determining if &DB::DB() is called or not.

    Anyway I concur with Corion that minimizing the the actual sheets for debugging is the better approach.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      I agree 100%,
      I often work around this performance issue by doing what Corion suggests.
      I'll use the real spreadsheet module to read the data, then export it to a json or yml file
      In the test I'll import the json/yml file instead of reading the spreadsheet.
      The json/yml import is easily 10x faster than the spreadsheet read even without the debugger


      I was just hoping there might be a clever way to skip those steps...
      This was really a one off test I was running so I didn't take the time to do the export.