-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '336-219-353-installer-do_update' into dev:
This started light-heartedly inspired by the remark in 955a15b about obsoleting AINIInfo - we can't (more on that later) but I started looking at #336 again - this led to extending the AFile API to cover installers, then to reworking refresh and to some serious performance improvements: __init__.py 4271 RefreshData boot: d1ad84 : 14636191 function calls (14609410 primitive calls) in 13.283 seconds Nit and small fixes/opts : 13706608 function calls (13679827 primitive calls) in 12.229 seconds Rename Installer.modified attribute: 13379068 function calls (13352287 primitive calls) in 11.719 seconds Installer.do_update : 13179209 function calls (13152391 primitive calls) in 11.780 seconds InstellersData.new_info : 12290347 function calls (12263529 primitive calls) in 11.400 seconds scandir IProject stat_tuple : 12304196 function calls (12283979 primitive calls) in 10.239 seconds (Functions slightly up but times lower always) Absorb _process_data_dir : 11092826 function calls (11086518 primitive calls) in 6.727 seconds Empties handling : 11092798 function calls (11086490 primitive calls) in 6.680 seconds Drop pending_size handling : 11085395 function calls (11079087 primitive calls) in 6.579 seconds Same for tab in refresh: __init__.py 4271 RefreshData tab in: d1ad84 : 284138 function calls (275354 primitive calls) in 0.737 seconds Nit and small fixes/opts : 283127 function calls (274343 primitive calls) in 0.689 seconds Rename Installer.modified attribute: 283719 function calls (274935 primitive calls) in 0.697 seconds Installer.do_update : 496795 function calls (487975 primitive calls) in 0.580 seconds InstellersData.new_info : 485745 function calls (476926 primitive calls) in 0.885 seconds scandir IProject stat_tuple : 436784 function calls (434428 primitive calls) in 0.293 seconds (!) In the second case further optimizations had no effect. As a bonus: __init__.py 3455 ShowPanel full refresh: d1ad84 : 27182371 function calls (27129707 primitive calls) in 505.038 seconds Rename Installer.modified attribute: 25924831 function calls (25872167 primitive calls) in 499.038 seconds Installer.do_update : 25923394 function calls (25870692 primitive calls) in 543.284 seconds Drop pending_size handling : 19720110 function calls (19714293 primitive calls) in 521.993 seconds Don't mind the timings, as seen they fluctuate - and don't forget that cProfile has an overhead. Dropping pending_size handling as expected took down millions of calls - we should have a progress bar on the work on progress. Note that I threw in some more opts before the final merge (see 223f5e5) so timings are slightly better even. The main contribution here however was the great simplification of the Installer/InstellersData refresh APIs. Performance was a result of this rather than the goal. A lot of peculiarFunctions were absorbed by AFile or were inlined - there are some more things to be done and some dusting (see "cleanup after merge" commit) but I believe that refresh is not anywhere near the opaque blob of nested function calls it used to be. Best part of #336, ghost of #219, harbinger of #353
- Loading branch information
Showing
10 changed files
with
706 additions
and
702 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.