Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
chore: touchups to readme and rationale files
  • Loading branch information
TheSisb committed Jul 24, 2019
1 parent 6b72972 commit 4372556
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions RATIONALE.md
Expand Up @@ -50,11 +50,13 @@ Example: `<CheckIcon color="red" size="24" />`
### Cons:
- React only.

### A note on performance
# A note on performance

You might think this approach is slower, and it is, but not by a significant margin. If we load 100 of these SVGs on a single page (unlikely and extreme scenario), the data is as follows:
Embedding a bunch of SVGs into the page isn't perceivably slower than image tags. In terms of rendering speed, if we load 100 of these SVGs on a single page (an unlikely and extreme scenario), the data is as follows:

- The image approach takes ~5ms
- The SVG with props approach takes ~7ms
- The image approach takes ~5ms to render.
- The SVG with props approach takes ~7ms to render.
[Please see this benchmark](https://github.com/TheSisb/svg-stress-test).

[Please see this benchmark](https://github.com/TheSisb/svg-stress-test).
In terms of asset loading time, 'SVG as images' and 'SVG as React components' are far more suitable than a font file. They
remove the need to maintain which icons exist in your project because only the used icons are bundled. Further, if you use lazy loading for your icons, the gains are even greater to your initial bundle size.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -72,7 +72,7 @@ Please be aware that this project has a [Code of Conduct](https://github.com/twi

## Maintainers

This project is maintained by the [design systems](https://github.com/orgs/twilio-labs/teams/design-systems) team.
This project is maintained by the [design systems team](https://github.com/orgs/twilio-labs/teams/design-systems).


---
Expand Down

0 comments on commit 4372556

Please sign in to comment.