WPDevelopers / essential-addons-for-elementor-lite

Essential Addons for Elementor. Ultimate elements library for Elementor.
https://essential-addons.com/elementor/
43 stars 43 forks source link

Performance Impact Due to Unnecessary Queries in `before_enqueue_styles()` #764

Open icreatesolutions opened 2 months ago

icreatesolutions commented 2 months ago

We are managing a large website with 70 Gravity Forms, out of which 50 are active.

We've noticed that the before_enqueue_styles() function located in wp-content/plugins/essential-addons-for-elementor-lite/includes/Traits/Enqueue.php is querying every form, including the inactive ones. This behavior significantly increases the number of database queries and effectively doubles the total page load time in our case.

In most cases, a page only contains 1 or 2 forms, so querying all forms (including inactive ones) seems unnecessary and inefficient. Ideally, the function should only query the forms that have been added to the specific page.

Proposed Solution:

NayeemNipun commented 2 months ago

Hi @icreatesolutions, Greetings. Hope you are doing well.

Regarding your query, thanks a lot for your concern and for informing us. Our Dev Team will check this and give you update. Dont worry.

Thanks and Regards.