Skip to content

5.1 - Performance: Move Icon Data Serialization to Async via API

Choose a tag to compare

@robertmarney robertmarney released this 16 Jan 16:29
· 2 commits to master since this release
4fd283d
⚡️[Performance] - Move Icon Data to Async Process (#1)

* This commit addresses the fundamental architecture flaw where all icon SVG data (10MB uncompressed, 2,063 icons) was passed with the field during
    form serialization. This caused massive payloads, duplicated work for multiple field instances, and could hit PHP memory limits.

   Changes:
   - Add API endpoint at /nova-vendor/heroicon/icons for on-demand icon loading
   - Implement window-based caching to share icons across field instances
   - Modify field to pass metadata only (iconSets) instead of full SVG content
   - Update FormField component to lazy-load icons when modal opens
   - Add loading and error states with retry functionality

   Performance impact:
   - 99.98% payload reduction on initial form load (10MB → 2KB)
   - 95%+ faster form loading
   - Single API request shared across all field instances
   - No PHP memory issues

   Backward compatibility maintained - all existing field methods work unchanged.

* Update to use POST to not interfere with catch all routers

---------

Co-authored-by: Robert Marney <robert.marney@onestrive.com>