postcss-debug icon indicating copy to clipboard operation
postcss-debug copied to clipboard

Color for time

Open ai opened this issue 8 years ago • 6 comments

We should highligh plugin and file time in different colors — green for the fastest and red to the slowest

/cc @Gaserd

ai avatar Jun 02 '16 19:06 ai

@ai Yeap 👍

Gaserd avatar Jun 02 '16 19:06 Gaserd

True. I also thought about that, but there are some detail issues:

Do we color by

  • relative time (slowest/fastest for current file)
  • relative time (slowest/fastest for all files)
  • absolute time (let's say everything < 5ms is green, > 10ms is red, color gradient for 5ms < time < 10ms ) ?

I guess a good solution would have to consider all three metrics, but only show one combined color.

andywer avatar Jun 02 '16 20:06 andywer

PS: I just had an idea. I don't know if it's good or rather not, so I will just post it here:

We could ask the user for permission once and then sent simple anonymized benchmark reports to some server to gather statistics about the most popular postcss plugins and their performance benchmarks.

andywer avatar Jun 02 '16 20:06 andywer

@andywer I think relative time (slowest/fastest for current file) And collection statistics this good idea

Gaserd avatar Jun 02 '16 20:06 Gaserd

I think realtive time is fine too. Because the main purpose of coloring is to find slowest plugins and optimize them.

ai avatar Jun 02 '16 20:06 ai

There should probably be an absolute cutoff though, like less than 5 or 10 ms is always green, right?

1j01 avatar Oct 12 '16 03:10 1j01