I have a large SPA with a single large CSS file which contains many rules. Some of them are outdated and should be refactored or removed. It is compiled from a set of SCSS source files.
I am now refactoring styles and wonder if there is a way to measure how long it takes to render the page using some specific CSS file.
Say, I am in the start point, where there are a lot of crap in CSS, and I can see that with current bloated stylesheet it takes 2.234 seconds to render the app.
Then, I refactor it step by step, apply some "optimizations" and on each step I can see that with some changes render time decreases, becoming, say, 2.21 seconds, and with some other changes this time increases, say, 2.5 seconds.
Is there a way to get that metric?
scss
into modules per each component and that gets compiled for only the components that get rendered in the browser. – Rattlyperformance.now()
? This should give you the parsing time. Now for the rendering time, it will be harder... – Herb