FeatureFuel
1

Optimized Script and Style Loading in Editor Mode Without Dependency-Specific Elements

Source: elementor/elementor#31300 · opened by @devsblink
Description

In the current setup, registered styles and scripts are loaded in the editor mode without relying on any dependency-specific elements. While this ensures broader compatibility and cleaner integration, it can unintentionally lead to performance issues. Specifically, the editor becomes slow due to unnecessary or globally loaded assets that aren't conditionally enqueued based on actual usage.

To improve performance, it's recommended to optimize asset loading by:

Registering scripts/styles globally but only enqueuing them when needed.

Using conditional checks to detect active blocks/widgets in the editor.

Avoiding broad loading of styles/scripts across all editor views.

This helps maintain clean, modular code while ensuring that editor performance remains smooth and responsive.

Agreement

• I confirm I have read and followed the Editor V4 Discussion Form guidelines, and agree this discussion may be closed without warning.

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests