#performance 6 articles
A provisioning step gated on success runs forever for every non-admin gotchas / spfx A startup step needing ManageLists writes no marker for ordinary members, so the whole batch replays on every page load; the marker needs two states A trailing-whitespace regex freezes the page when it parses AI output gotchas / spfx /\s+$/ and lazy (.+?)\s*$ are quadratic on a line with a long run of spaces that does not end the line; text from an AI model or a foreign document is untrusted input, so trim with trimEnd() and anchor captures on a… GetObjectSharingInformation — GET always 405, CreatedBy always null, and other measured facts gotchas / rest-api GET is 405 every time (stop retrying it: 2.7× slower), CreatedBy is always null, $expand is dead weight Performance measurements taken in a hidden browser tab are worthless — and they look like a freeze gotchas / tooling Hidden tabs never fire requestAnimationFrame and clamp setTimeout to ~1/s, so the run times out and looks like the very freeze you were chasing (and the code under test never ran either); CSS transitions never advance… The 5,000-item list view threshold — and why indexes must come early gotchas / lists It's scanned rows, not returned rows; index early, page always Unbounded Promise.all fan-out over a customer-sized collection invites HTTP 429 gotchas / rest-api Fan-out is safe when YOUR code decides the count, dangerous when the customer's data does; bounded batch and worker-pool patterns