Aktionen
GX-Feature #69226
geschlossenPrevent the CSS compiler from being called multiple times when the shop has too many simultaneous access
Status:
Erledigt
Priorität:
Dringend
Zugewiesen an:
Marvin Muxfeld
Kategorie:
Frontend
Zielversion:
% erledigt:
0%
Geschätzter Aufwand:
Steps to reproduce:
Betroffene Versionen:
Unbestimmt
Release Notes Langtext:
Die Datei `dynamic_theme_style.css.php` wird nun gesperrt, sobald sie die CSS-Dateien für das Theme kompiliert.
Beschreibung
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:
- Apply attached patch (optional)
- Open 2 browser tabs, side by side with the DevTool open (Network tab and filter by
CSS
) - Delete only the
cache/__dynamic.css
file and call the shop- First tab: CSS should be served with the
dynamic_theme_style.css.php
- Second tab: CSS should be served with the
main.css/main.min.css
- First tab: CSS should be served with the
- Delete only the
public/theme/main.css
orpublic/theme/main.min.css
file and call the shop- Both tabs: CSS should be served with the
dynamic_theme_style.css.php
- The second tab should wait until the
dynamic_theme_style.css.php
file of the first tab is loaded
- Both tabs: CSS should be served with the
- Delete
cache/__dynamic.css
andpublic/theme/main.css
orpublic/theme/main.min.css
files and call the shop- Both tabs: CSS should be served with the
dynamic_theme_style.css.php
- The second tab should wait until the
dynamic_theme_style.css.php
file of the first tab is loaded
- Both tabs: CSS should be served with the
Dateien
Aktionen