-
Notifications
You must be signed in to change notification settings - Fork 390
-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dynamically import ability, item, hero data #338
Comments
If we don't have a performance/load time issue then we don't necessarily have to do this. However, if we want to make the tooltips available in multiple languages, we will probably want to do this because loading multiple languages of abilities will get big really quickly. |
Did a quick check, abilities data is currently about 720KB uncompressed and 120KB compressed. As of this writing the compressed bundle size is 923KB, so this is a pretty significant chunk of the bundle. Items are 144KB. Assuming the same factor of 6 for compression that's 24KB compressed. All in all I estimate around 200KB of our bundle is dotaconstants data. |
Doing this will also enable translated data, since the client can just request data in the desired language. |
status update: done for abilities, not done for heroes/items at this point |
I also recently did this for items. Heroes is left (but is also the smallest of the three), plus being heavily used means we may not benefit as much from the code splitting. |
https://github.com/odota/ui/blob/master/src/components/Visualizations/inflictorWithValue.jsx
The text was updated successfully, but these errors were encountered: