Slow first paint when using a loader
When using a loader in any page the first paint gets delayed 500ms, this is really noticeable, look at this based on this examples home page:
If i add
console.log(performance.now());
to main.tsx
and in the component in routes/index.tsx
i get the following timings (image 1)
But if we simply add this to the route:
loader: () => {}
We get the following results (image 2)
Here we can see almost a 500ms slowdown by just adding the loader, i would guess this is an error? or is there other reason its taking so long to render?TanStack | High Quality Open-Source Software for Web Developers
Headless, type-safe, powerful utilities for complex workflows like Data Management, Data Visualization, Charts, Tables, and UI Components.



6 Replies
adverse-sapphire•12mo ago
its probably the
defaultPendingMinMs
adverse-sapphire•12mo ago

absent-sapphireOP•12mo ago
yup that was it, missed that setting, any reason for it to be 500 by default?
or any reason not to put it to 0?
adverse-sapphire•12mo ago
depends on the use case
absent-sapphireOP•12mo ago
Wouldn't 0 be a better default in most users?
initial-rose•12mo ago
Probably…
But still depends on preloading etc