collect profile of startup and pack resolution
This commit is contained in:
parent
760515c551
commit
1ba33bdc26
@ -351,8 +351,10 @@ static bool initialize(void) {
|
||||
/* that is why PhysicsFS is initialized before anything else */
|
||||
toml_set_memutil(SDL_malloc, SDL_free);
|
||||
|
||||
profile_start("resolve_pack_dependencies()");
|
||||
/* time to orderly resolve any dependencies present */
|
||||
resolve_pack_dependencies("data");
|
||||
profile_end("resolve_pack_dependencies()");
|
||||
|
||||
/* load the config file into an opaque table */
|
||||
{
|
||||
@ -710,6 +712,8 @@ static void reset_state(void) {
|
||||
|
||||
|
||||
int enter_loop(int argc, char **argv) {
|
||||
profile_start("startup");
|
||||
|
||||
ctx.argc = argc;
|
||||
ctx.argv = argv;
|
||||
ctx.base_dir = SDL_GetBasePath();
|
||||
@ -793,6 +797,8 @@ int enter_loop(int argc, char **argv) {
|
||||
ctx.was_successful = true;
|
||||
ctx.game.initialization_needed = true;
|
||||
|
||||
profile_end("startup");
|
||||
|
||||
while (ctx.is_running) {
|
||||
if (game_object_try_reloading()) {
|
||||
ctx.game.initialization_needed = true;
|
||||
@ -802,6 +808,7 @@ int enter_loop(int argc, char **argv) {
|
||||
main_loop();
|
||||
}
|
||||
|
||||
if (ctx.game.debug)
|
||||
profile_list_stats();
|
||||
|
||||
/* loop is over */
|
||||
|
Loading…
Reference in New Issue
Block a user