Loading screen takes too long #379

Open
opened 2026-04-18 12:26:15 -05:00 by EncryptedCurse · 1 comment
EncryptedCurse commented 2026-04-18 12:26:15 -05:00 (Migrated from github.com)

Every navigation change shows the loading screen regardless of how long the page takes to actually load. It's visually jarring.

github.com/voidauth/voidauth@0ddbf8777f/frontend/src/app/services/spinner.service.ts (L7-L30)

This timeout means that the loading screen will be displayed even if the page takes less than 500 ms to load.

Perhaps it would be better to only show the loading screen if it takes longer than some threshold or just add an option to disable it altogether.

Every navigation change shows the loading screen regardless of how long the page takes to actually load. It's visually jarring. https://github.com/voidauth/voidauth/blob/0ddbf8777f92bc7bff2266c7d607bb3b388cfa3f/frontend/src/app/services/spinner.service.ts#L7-L30 This timeout means that the loading screen will be displayed even if the page takes less than 500 ms to load. Perhaps it would be better to only show the loading screen if it takes longer than some threshold or just add an option to disable it altogether.
notquitenothing commented 2026-04-26 09:42:09 -05:00 (Migrated from github.com)

I've played with this a bit and might have a solution. The 500ms timer is to make sure that the loading spinner does not open for less than half a second, which would appear as a quick flicker. I have some code working that waits to open the loading spinner for a bit, then if still loading opens it for at least a second. The only issue is that, due to the single threaded nature of browser js, sometimes this looks like:

  • Waiting with no spinner, potentially longer than timer if data load is blocking
  • Data (in a table for example) pops in
  • Spinner opens for 1 second, then disappears

This results in the spinner only opening after all the loading is finished, which is not great. I will keep messing with it and see if I can figure it out.

I've played with this a bit and might have a solution. The 500ms timer is to make sure that the loading spinner does not open for less than half a second, which would appear as a quick flicker. I have some code working that waits to open the loading spinner for a bit, then if still loading opens it for at least a second. The only issue is that, due to the single threaded nature of browser js, sometimes this looks like: - Waiting with no spinner, potentially longer than timer if data load is blocking - Data (in a table for example) pops in - Spinner opens for 1 second, then disappears This results in the spinner only opening _after_ all the loading is finished, which is not great. I will keep messing with it and see if I can figure it out.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
adam/gate#379
No description provided.