Skip to content

Refresh Optimizations III #701

@Utumno

Description

@Utumno

There are a few optimizations in refresh that cannot be handled by the APIs developed in #353 (mainly RefrData and RefrIn). Our goal there was to develop a mechanism for collecting info to pass each data store's refresh (to avoid scanning the data folder) and each UIList's RefreshUI (to avoid redrawing all items). The mechanism was developed and in the process refresh/UI satellites disappeared (think new_info, delete_refresh, warning methods etc) centralizing the refresh operations per data store. However there are some performance and extensibility issues that transcend the data store model:

  • scanning the Data folder once - currently we list per data store and rerun the regexes on each RefreshData call. Apart from the obvious performance issues there are subtle dependencies between mods and bsas for instance (see comments in _refresh_mod_inis_and_strings). This last one needs coordinating refreshes of data stores and keeping common data structures in a higher level object. RefreshData should be promoted to a class and the stores should subscribe to it.
  • whenever we RefreshUI for mods we pass True to the saves RefreshUI (see propagate_refresh). This needs a status mechanism which is already developed for inis but it's complex to generalize -> d07c43c
  • refreshing saves on boot should be replaced by refreshing inis - this is related to ShowPanel the most complex client of refresh remaining
  • _file_or_active_updates could use some cleanup and optimization - the goal would be to use rdata and ldiff passed on from callers to perform more granular refreshes - not so much for performance but as a final check for refresh data structures being updated correctly.

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-perfArea: Performance (runtime performance and/or memory usage)C-goalCategory: Long term goal. May be code-related or a meta goal.C-internalCategory: Keep track of internal refactoring. Implies the C-todo label except if it is a full C-goal

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions