Optimization for performance
- caching system (save complex queries in transients and automatically flush them on dependent data instances have been changed) - optimize scripts and styles and load them optionally on selected pages (Swiper, ECharts, Datatables, FlatPicker Calendar) - image optimization (logos and player photos) - can be used 3d party plugins - LIVE performance improvements
- load some content later by ajax (in hidden tabs, in hidden slides, in the list of games)
- image optimization plugin (in progress) - reduce small logos to 50*50 with tinypng API
- optimize DB structure (PRO version - player stats) to reduce the size and improve performance: maybe create statistic columns dynamically on save config
--- Original post ---
This script is amazing but too heavy. It could be lighter. Some tips for speed are:
1. All of anwp scripts and css loads in every page even not used. I use asset clean up and unload scripts that are not used in every pages. You can unload js/css by page/post or by post type ex. From all matches/clubs/etc pages.
I find what some js do. Echarts is for charts of course, easytimer is for livescore, datatables for player stats. But I don't know what propper/polyfilled/modal/airbnb does.
2. The script loads the original club image which is 150x150px (api import) and about 30kb. Is it possible to select to use the thumb of that image because now each of my pages has 1-1.5 mb just for club images
Customer support service by UserEcho
What about a special Settings page with the possibility to enable/disable scripts/styles.
Maybe a solution like on the screenshot below will be cool?
I had the same problem, kindly help me how to get into this setting page. Thank you
that would be great. Similar to asset clean up. But also include some info for what each JS does/used in. So we know where to disable
v0.13.7 - Swiper (slider) and ECharts (charts) scripts are loading only on pages where needed
- loading scripts (Justified gallery + Featherlight) - only on required pages;
- removed OverlayScrollbars
- optimized and removed unused CSS styles (main CSS file size is reduced appr. 300%)
- removed IE support (CSS styles and some scripts)
- image lazy loading plugins work properly with team logos and player photos. Now they use <img> tag, before - background image.
Андрей, приветствую! Планируются ли еще какие то работы по оптимизации для ускорения процессов? Все еще наблюдается тяжесть загрузки страниц, хотя сделано не мало.
Было бы здорово дотянуть до показателей 70+.
Заранее благодарен за ответ.
- loading scripts (DataTables + Flatpickr) - only on required pages;
- added optimized Swiper library (twice smaller). If you have a problem with it, disable it in FL+ Customizer
- LIVE Import - changed import logic and rewritten code for better performance
- img tag: added loading="lazy" attribute and width and height attributes
When will you do the DB optimization?
It is a bit tricky and risky because it requires database manipulation.
Maybe it will be a special plugin for advanced users.