nullEDGE – Pro-code performance missedsteaks & omissons with Tim Woodruff

I wouldn’t mind having a session like this every week.

Tim can be very critical, but only someone who truly loves ServiceNow would do this.

Tim Woodruff delivers the longest nullEDGE session (25 minutes, no slides), and somehow it feels too short.

Key takeaways

I’ll try to summarise the main points.

Flow designer

  • It’s fundamentally slow (heavy record updates + constant I/O).
  • Don’t use it.
  • If you must use it: pack heavy logic in script actions calling script includes.

Queries

  • Avoid nested queries.
  • Avoid top-level OR button + ^NQ in encoded queries (NQ = new query).
  • Dot-walking = SQL joins.
  • Use “startsWith” over “contains”.
  • “getRowCount()” executes a separate query. Better to add a counter to your loop.

Other stuff

  • Use “gs.debug()” instead of “gs.log()” or “gs.info()”.
  • Each log = insert in sys_log.
  • Don’t catch errors just to log them. The system includes stack traces automatically.
  • Use “sysparm_filter_only=true” for heavy tables.

Go watch the full session. And buy his book (probably the only book I recommend without reading it yet).

P.S. I know those typos in the title are on purpose. It’s funny. It still bothers me every time I see them.

References