Linearize initial loading of game assets

Discussion in 'Other' started by Teh Freek, Feb 24, 2015.

  1. Teh Freek

    Teh Freek Void-Bound Voyager

    The database nature of the game asset file (assets/packed.pak) lends itself very well to random access, which is optimal when the file is either on a SSD or in RAM (e.g. disk cache). However when on a HDD, sequential access is optimal on initial access due to the nature of seeking on a platter. This can be confirmed by comparing the time it takes to load the game initially from fresh versus the time taken by loading the asset file into disk cache (e.g. cat assets/packed.pak > /dev/null) and then starting the game.

    I propose that initial loading and indexing of the game assets, i.e. what happens during the loading screen, start with the record placed closest to the beginning of the asset file and then proceed sequentially based on the position of the asset within the file. This will mitigate the seek delays that a HDD has.

    I understand that the database nature of the asset file may actually work against such an operation, but I do believe that this will reduce the time it takes to load the game fresh from a HDD by at least 30%.
     

Share This Page