You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the autocomplete function in the console for dynamic arguments, self.args() is called 8 (!) times for each completion. That might not be a big issue when it just returns a list, but once the functions becomes more complex it adds a lot of overhead.
The function could be called once and the return value stored locally.
The text was updated successfully, but these errors were encountered:
Ok, it seems to be only partly the console's fault. Making only one call to args() can decrease the number of times args is called to 3. Those three calls result from the readline module calling the complete() function three times. No idea why it does that...
Mh, but it seems kinda silly to me then that args() returns a list with all arguments every time..
Maybe I'm missing something here.
Anyways, I moved the computation logic away front he args() function, that already helped a lot.
When using the autocomplete function in the console for dynamic arguments, self.args() is called 8 (!) times for each completion. That might not be a big issue when it just returns a list, but once the functions becomes more complex it adds a lot of overhead.
The function could be called once and the return value stored locally.
The text was updated successfully, but these errors were encountered: