Skip to content

Commit

Permalink
Comparing stylin with styled-components
Browse files Browse the repository at this point in the history
  • Loading branch information
sultan99 committed Mar 17, 2024
1 parent fdcf34e commit 789f5c3
Show file tree
Hide file tree
Showing 24 changed files with 151 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/benchmark/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Benchmarking styled-components versus stylin

### Stylin memory usage
<img src="./stylin-memory-usage.png"/>

### Styled components
<img src="./styled-components-memory-usage.png"/>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
19 changes: 19 additions & 0 deletions packages/benchmark/styled-components/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!doctype html><html><head><title>Styled-components the dictator of style</title><meta charset="UTF-8"><link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png"><link rel="manifest" href="site.webmanifest"><link href="https://fonts.googleapis.com/css?family=Roboto:400,600" rel="stylesheet"><style>html {
font-family: 'Open Sans', sans-serif;
overflow-y: scroll;
}
body {
margin: 0;
}
input, select, textarea, button {
font-family: 'Open Sans', sans-serif;
}
* {
user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-tap-highlight-color: transparent;
-webkit-user-select: none;
}</style><script defer="defer" src="main.4a052942f5b47d9a896b.js"></script></head><body><main id="app"></main></body></html>

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
19 changes: 19 additions & 0 deletions packages/benchmark/styled-components/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "Stylin",
"short_name": "Stylin",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ff2e00",
"display": "standalone"
}
Binary file added packages/benchmark/stylin-memory-usage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/benchmark/stylin/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/benchmark/stylin/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/benchmark/stylin/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/benchmark/stylin/favicon.ico
Binary file not shown.
19 changes: 19 additions & 0 deletions packages/benchmark/stylin/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!doctype html><html><head><title>Stylin the dictator of style</title><meta charset="UTF-8"><link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png"><link rel="manifest" href="site.webmanifest"><link href="https://fonts.googleapis.com/css?family=Roboto:400,600" rel="stylesheet"><style>html {
font-family: 'Open Sans', sans-serif;
overflow-y: scroll;
}
body {
margin: 0;
}
input, select, textarea, button {
font-family: 'Open Sans', sans-serif;
}
* {
user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-tap-highlight-color: transparent;
-webkit-user-select: none;
}</style><script defer="defer" src="main.d618bb255488347abb97.js"></script><link href="main.css" rel="stylesheet"></head><body><main id="app"></main></body></html>
6 changes: 6 additions & 0 deletions packages/benchmark/stylin/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions packages/benchmark/stylin/main.d618bb255488347abb97.js

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions packages/benchmark/stylin/main.d618bb255488347abb97.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
19 changes: 19 additions & 0 deletions packages/benchmark/stylin/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "Stylin",
"short_name": "Stylin",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ff2e00",
"display": "standalone"
}

0 comments on commit 789f5c3

Please sign in to comment.