mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 12:08:55 +01:00
[MIRROR] Adds lazyloading to the asset subsystems [MDB IGNORE] (#15960)
* Adds lazyloading to the asset subsystems (#69454) * Adds lazyloading to the asset subsystems This currently applies only to spritesheets because of how monumentally expensive they are. If an asset is requested it will immediately be fully loaded, but otherwise we slowly load them in with a separate subsystem. This allows us to not hold up initialize with hair stuff. Saves roughly 33% (16 seconds with LOW_MEMORY_MODE) of initialize on my machine My target is something closer to the 9 second init that had back in 2019, this is a good first step. Lets see how much more we can do yeah lads? Co-authored-by: san7890 <the@ san7890.com> * Adds lazyloading to the asset subsystems Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: san7890 <the@ san7890.com>
This commit is contained in:
co-authored by
san7890
LemonInTheDark
parent
6da433c8eb
commit
7579176eed
@@ -16,7 +16,7 @@ SUBSYSTEM_DEF(early_assets)
|
||||
if (!initial(asset_type.early))
|
||||
continue
|
||||
|
||||
if (!get_asset_datum(asset_type))
|
||||
if (!load_asset_datum(asset_type))
|
||||
stack_trace("Could not initialize early asset [asset_type]!")
|
||||
|
||||
CHECK_TICK
|
||||
|
||||
Reference in New Issue
Block a user