Projekt

Allgemein

Profil

GX-Feature #69226

Von Alexandre Ataides vor etwa 3 Jahren aktualisiert

**Problem:** 
 When a shop has a lot of simultaneous access and meanwhile the shop owner is adding/updating/deleting some information of his shop, the `dynamic_theme_style.css.php` (responsible for compiling the CSS of the theme) is called multiple times, increasing the page load time of the shop. 

 **Goal:** 
 We should prevent that the CSS compiler runs on every call. 
 We need to lock the `dynamic_theme_style.css.php` file until the new CSS is compiled/generated. 

 **How to test:** 
 1. Apply attached patch (optional) 
 1. Open 2 browser tabs, side by side with the DevTool (Network tab and filter by `CSS`) tab) 
 1. Delete only the `cache/__dynamic.css` file and call the shop 
  1. First tab: CSS should be served with the `dynamic_theme_style.css.php` 
  1. Second tab: CSS should be served with the `main.css/main.min.css` 
 1. Delete only the `public/theme/main.css` or `public/theme/main.min.css` file and call the shop 
  1. Both tabs: CSS should be served with the `dynamic_theme_style.css.php` 
  1. The second tab should wait until the `dynamic_theme_style.css.php` file of the first tab is loaded 
 1. Delete `cache/__dynamic.css` and `public/theme/main.css` or `public/theme/main.min.css` files and call the shop 
  1. Both tabs: CSS should be served with the `dynamic_theme_style.css.php` 
  1. The second tab should wait until the `dynamic_theme_style.css.php` file of the first tab is loaded

Zurück