erpnext icon indicating copy to clipboard operation
erpnext copied to clipboard

perf: hot path in page load

Open blaggacao opened this issue 1 year ago • 14 comments

This quite literally removes one entire blocking redundant roundtrip from reaching DOM Load event (the hot path):

image

blaggacao avatar Jun 12 '24 09:06 blaggacao

Works even better with:

  • https://github.com/frappe/frappe/pull/26752

blaggacao avatar Jun 12 '24 09:06 blaggacao

@barredterra I implemented this with yet another strategy, clarifying the contrived python implementation to prevent future developers from misunderstanding the JavaScript code.

The performance goal is now achieved through loading this (vastly) static parameter into the boot dictionary, essentially amounting to client side caching of this often-queried endpoint.

blaggacao avatar Aug 01 '24 21:08 blaggacao

@barredterra Could you revise your request for changes to this PR? Otherwise, it's ready and I am to own it and stand by for any potential consequences not covered by the test suite.

blaggacao avatar Sep 03 '24 18:09 blaggacao