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
metropolitan-bronze•15mo ago
its probably the
defaultPendingMinMsmetropolitan-bronze•15mo ago

foreign-sapphireOP•15mo 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?
metropolitan-bronze•15mo ago
depends on the use case
foreign-sapphireOP•15mo ago
Wouldn't 0 be a better default in most users?
correct-apricot•15mo ago
Probably…
But still depends on preloading etc
