Skip to content

Instantly share code, notes, and snippets.

@Infernio
Infernio / profile_disable_1.txt
Last active January 9, 2021 16:36
Baseline results (at dev)
__init__.py 1080 _handle_left_down: 665379 function calls (665371 primitive calls) in 0.404 seconds
Ordered by: cumulative time
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 0.393 0.393 bash\balt.py:869(_conversation_wrapper)
1 0.000 0.000 0.393 0.393 bash\basher\__init__.py:1098(_toggle_active_state)
4 0.002 0.001 0.246 0.062 bash\balt.py:1071(PopulateItems)
1 0.000 0.000 0.240 0.240 bash\basher\__init__.py:989(RefreshUI)
2 0.000 0.000 0.240 0.120 bash\balt.py:1097(RefreshUI)
@Infernio
Infernio / profile_disable_2.txt
Last active January 9, 2021 13:10
After fixing the remove_from_plugins_txt usages
__init__.py 1074 _handle_left_down: 387071 function calls (387063 primitive calls) in 0.356 seconds
Ordered by: cumulative time
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 0.345 0.345 bash\balt.py:866(_conversation_wrapper)
1 0.000 0.000 0.344 0.344 bash\basher\__init__.py:1092(_toggle_active_state)
4 0.002 0.000 0.240 0.060 bash\balt.py:1068(PopulateItems)
1 0.000 0.000 0.234 0.234 bash\basher\__init__.py:983(RefreshUI)
2 0.000 0.000 0.234 0.117 bash\balt.py:1094(RefreshUI)
@Infernio
Infernio / profile_disable_3.txt
Created January 9, 2021 13:08
After optimizing the hell out of _fix_active_plugins
__init__.py 1074 _handle_left_down: 324971 function calls (324963 primitive calls) in 0.339 seconds
Ordered by: cumulative time
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 0.324 0.324 bash\balt.py:866(_conversation_wrapper)
1 0.000 0.000 0.324 0.324 bash\basher\__init__.py:1092(_toggle_active_state)
4 0.002 0.001 0.246 0.061 bash\balt.py:1068(PopulateItems)
1 0.000 0.000 0.234 0.234 bash\basher\__init__.py:983(RefreshUI)
2 0.000 0.000 0.234 0.117 bash\balt.py:1094(RefreshUI)
@Infernio
Infernio / profile_disable_4.txt
Last active January 9, 2021 15:04
After optimizing _fix_load_order a bit
__init__.py 1074 _handle_left_down: 320997 function calls (320989 primitive calls) in 0.342 seconds
Ordered by: cumulative time
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 0.331 0.331 bash\balt.py:866(_conversation_wrapper)
1 0.000 0.000 0.331 0.331 bash\basher\__init__.py:1092(_toggle_active_state)
4 0.002 0.000 0.230 0.057 bash\balt.py:1068(PopulateItems)
1 0.000 0.000 0.222 0.222 bash\basher\__init__.py:983(RefreshUI)
2 0.000 0.000 0.222 0.111 bash\balt.py:1094(RefreshUI)
@Infernio
Infernio / interlude_eqs_on_launch.txt
Created January 9, 2021 16:00
Interlude: get_load_order eats 60000+ bolt.Path.__eq__'s. Where do they come from?
Counter({
'[\' File "E:/Infernio/Desktop/Programming/wrye-bash/Mopy/Wrye Bash Launcher.pyw", line 88, in <module>\\n bash.main(opts)\\n\', \' File "bash\\\\bash.py", line 265, in main\\n _main(opts, wx_locale)\\n\', \' File "bash\\\\bash.py", line 427, in _main\\n frame = app.Init() # Link.Frame is set here !\\n\', \' File "bash\\\\basher\\\\__init__.py", line 4154, in Init\\n self.InitData(progress)\\n\', \' File "bash\\\\basher\\\\__init__.py", line 4190, in InitData\\n bosh.modInfos.refresh(booting=True)\\n\', \' File "bash\\\\bosh\\\\__init__.py", line 2068, in refresh\\n forceRefresh=hasChanged or _modTimesChange, forceActive=deleted)\\n\', \' File "bash\\\\bosh\\\\__init__.py", line 1805, in _modinfos_cache_wrapper\\n lord_func(self, *args, **kwargs)\\n\', \' File "bash\\\\bosh\\\\__init__.py", line 1918, in refreshLoadOrder\\n else: _do_lo_refresh()\\n\', \' File "bash\\\\bosh\\\\__init__.py", line 1914, in _do_lo_refresh\\n cached_active=not forceActive)\\n\', \
@Infernio
Infernio / profile_disable_5.txt
Last active January 9, 2021 17:21
After cursing about paths and optimizing getIniPath's innocent-looking but in reality horrid use of them
__init__.py 1074 _handle_left_down: 308421 function calls (308413 primitive calls) in 0.337 seconds
Ordered by: cumulative time
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 0.326 0.326 bash\balt.py:866(_conversation_wrapper)
1 0.000 0.000 0.325 0.325 bash\basher\__init__.py:1092(_toggle_active_state)
4 0.002 0.001 0.243 0.061 bash\balt.py:1068(PopulateItems)
1 0.000 0.000 0.235 0.235 bash\basher\__init__.py:983(RefreshUI)
2 0.000 0.000 0.235 0.118 bash\balt.py:1094(RefreshUI)
@Infernio
Infernio / profile_disable_6.txt
Created January 9, 2021 21:02
The big one: Passing redraw to RefreshUI
__init__.py 1075 _handle_left_down: 151622 function calls (151608 primitive calls) in 0.116 seconds
Ordered by: cumulative time
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 0.105 0.105 bash\balt.py:866(_conversation_wrapper)
1 0.000 0.000 0.105 0.105 bash\basher\__init__.py:1093(_toggle_active_state)
1 0.000 0.000 0.064 0.064 bash\bosh\__init__.py:1795(_modinfos_cache_wrapper)
1 0.000 0.000 0.023 0.023 bash\bosh\__init__.py:1923(cached_lo_save_active)
3 0.000 0.000 0.023 0.008 bash\basher\__init__.py:154(SetDetails)
@Infernio
Infernio / profile_disable_7.txt
Created January 10, 2021 13:24
After caching dependents in modInfos
__init__.py 1075 _handle_left_down: 145013 function calls (144999 primitive calls) in 0.095 seconds
Ordered by: cumulative time
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 0.085 0.085 bash\balt.py:866(_conversation_wrapper)
1 0.000 0.000 0.085 0.085 bash\basher\__init__.py:1093(_toggle_active_state)
1 0.000 0.000 0.057 0.057 bash\bosh\__init__.py:1799(_modinfos_cache_wrapper)
2 0.000 0.000 0.023 0.012 bash\balt.py:1290(SelectAndShowItem)
9/7 0.001 0.000 0.023 0.003 {built-in method SetItemState}
@Infernio
Infernio / profile_disable_8.txt
Created January 10, 2021 13:48
After avoiding the get_ordered call in lo_deactivate
__init__.py 1075 _handle_left_down: 135315 function calls (135301 primitive calls) in 0.094 seconds
Ordered by: cumulative time
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 0.082 0.082 bash\balt.py:866(_conversation_wrapper)
1 0.000 0.000 0.082 0.082 bash\basher\__init__.py:1093(_toggle_active_state)
1 0.000 0.000 0.059 0.059 bash\bosh\__init__.py:1799(_modinfos_cache_wrapper)
3 0.000 0.000 0.026 0.009 bash\basher\__init__.py:154(SetDetails)
3 0.000 0.000 0.026 0.009 bash\basher\__init__.py:151(_setDetails)
@Infernio
Infernio / profile_startup_1.txt
Created January 17, 2021 09:51
Baseline result
bash.py 435 _main: 2730355 function calls (2724884 primitive calls) in 2.970 seconds
Ordered by: cumulative time
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 3.021 3.021 bash\basher\__init__.py:4206(Init)
3/1 0.000 0.000 1.268 1.268 bash\balt.py:869(_conversation_wrapper)
1 0.000 0.000 1.268 1.268 bash\basher\__init__.py:3942(RefreshData)
1 0.000 0.000 1.267 1.267 bash\basher\__init__.py:164(ShowPanel)
1 0.000 0.000 1.252 1.252 bash\basher\__init__.py:225(ShowPanel)