+12
Progress - 50%

Optimization for performance

lefaek 2 years ago updated by Andrei S. (Developer) 2 months ago 12

ToDo

- caching system (save complex queries in transients and automatically flush them on dependent data instances have been changed)

- optimize DB structure (PRO version - player stats) to reduce the size and improve performance: maybe create statistic columns dynamically on save config

- 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 (maybe add a possibility to use Web Socket)

- load some content later by ajax (in hidden tabs, in hidden slides, in the list of games)

====

--- 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


+3
Under review

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?

Hi Andrei, 

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

Planned

--

Best Regards

Andrei S.

+2

v0.13.7 - Swiper (slider) and ECharts (charts) scripts are loading only on pages where needed

+1

v0.14.0

- 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)

since v0.14.0 

- image lazy loading plugins work properly with team logos and player photos. Now they use <img> tag, before - background image.

Андрей, приветствую! Планируются ли еще какие то работы по оптимизации для ускорения процессов? Все еще наблюдается тяжесть загрузки страниц, хотя сделано не мало. 


Было бы здорово дотянуть до показателей 70+.
Заранее благодарен за ответ.

Progress - 50%

--

Best Regards

Andrei S.

+2

v0.14.8

- loading scripts (DataTables + Flatpickr) - only on required pages;


v0.14.8

- added optimized Swiper library (twice smaller). If you have a problem with it, disable it in FL+ Customizer