I have React application that renders a lot of images on the main page.
And I already made some improvements:
- Using
react-lazy-load-image-componenteverywhere. lazy,Suspensefor react routes.- Configure several compression plugins:
config.plugins.push(new CompressionPlugin({
filename: '[path].gz[query]',
algorithm: 'gzip',
test: /\.(js|css|html|svg)$/,
threshold: 8192,
minRatio: 0.8
}))
config.plugins.push(new BrotliPlugin({
asset: '[path].br[query]',
test: /\.(js|css|html|svg)$/,
threshold: 10240,
minRatio: 0.8
}))
But I still have poor performance
I will provide additional data or screens by request.
The test was made in an anonym browser window. Using:
yarn build --profile
serve -s build