Client side performance
Quick answer
Make forms and portals load quickly: script audit, field count, related lists and browser diagnostics.
Key takeaways
- Measure with developer tools before optimising
- Synchronous server calls are the biggest single cause
- Trim fields and related lists on heavily used forms
- Every portal widget runs a server script per page load
Measure first
Open the browser developer tools and the ServiceNow field watcher, load the form and look at what takes the time. Guessing usually leads to optimising something that costs five milliseconds.
Usual suspects
Four patterns cause most slow forms.
- Synchronous GlideAjax or client side GlideRecord blocking render
- A form with sixty fields and eight related lists
- Onload scripts running for every user when they apply to one role
- Large attachments or images embedded in the form or portal page
Portal specifics
Widgets add their own cost. Keep server scripts narrow, avoid loading records you do not display, and remember that each widget on a page runs its own server script on every load.
Want to learn this properly?
Our live, instructor-led ServiceNow Training covers this hands-on, with real projects and a certification path.
Check your understanding
What is the fastest way to find the slow part of a form?
- A. Ask users
- B. Browser developer tools and field watcher
- C. Read the update set
- D. Check the database
Show answer
B. Browser developer tools and field watcher
Client side timing shows exactly what is blocking render.
Which pattern should be removed from client scripts?
- A. g_form.setValue
- B. Synchronous server calls
- C. Field validation
- D. Info messages
Show answer
B. Synchronous server calls
Synchronous calls block the browser until they return.