mirror of https://github.com/KLayout/klayout.git
Ruby debugger performance boost
Problem was that the file-to-id cache was cleared upon calling internal Ruby functions (begin_exec was triggered). In one test case, the execution performance improved from 6s/320s (without/with debugger) to 6s/7s (without/with debugger)
This commit is contained in:
parent
ba0aaef132
commit
53fa78c01f
|
|
@ -888,10 +888,12 @@ gsi::Console *PythonInterpreter::current_console () const
|
|||
|
||||
void PythonInterpreter::begin_execution ()
|
||||
{
|
||||
m_file_id_map.clear ();
|
||||
m_block_exceptions = false;
|
||||
if (m_current_exec_level++ == 0 && mp_current_exec_handler) {
|
||||
mp_current_exec_handler->start_exec (this);
|
||||
if (m_current_exec_level++ == 0) {
|
||||
m_file_id_map.clear ();
|
||||
if (mp_current_exec_handler) {
|
||||
mp_current_exec_handler->start_exec (this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2486,9 +2486,11 @@ RubyInterpreter::begin_exec ()
|
|||
{
|
||||
d->exit_on_next = false;
|
||||
d->block_exceptions = false;
|
||||
d->file_id_map.clear ();
|
||||
if (d->current_exec_level++ == 0 && d->current_exec_handler) {
|
||||
d->current_exec_handler->start_exec (this);
|
||||
if (d->current_exec_level++ == 0) {
|
||||
d->file_id_map.clear ();
|
||||
if (d->current_exec_handler) {
|
||||
d->current_exec_handler->start_exec (this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue