bdkjones / CodeKit2

CodeKit 2 Beta
97 stars 4 forks source link

Slow Compiling #161

Closed shshaw closed 10 years ago

shshaw commented 10 years ago

Since switching to CodeKit 2, code compiling has been noticeably slower. For moderately complex projects (20-30 LESS files, 1-10 Javascript files), the time between saving and the notification that the files have updated has gone up by several seconds compared to CodeKit 1

Here are my super accurate iPhone stopwatch calculations comparing LESS & Javascript in various projects (I don't use many other languages regularly, so I can't attest to their speed.)

LESS

  1. Sample 1
    • CodeKit 1: 4.67 Seconds
    • CodeKit 2: 7.48 Seconds
  2. Sample 2
    • CodeKit 1: 3.86 Seconds
    • CodeKit 2: 6.26 Seconds
  3. Sample 3
    • CodeKit 1: 3.61 Seconds
    • CodeKit 2: 5.22 Seconds

LESS Compiling feels drastically slower. In CodeKit 1, by the time I pull the browser back up, everything is compiled and ready to go. In CodeKit 2, I find myself waiting. This could be attributed to differences in LESS 1.5 and 1.6.

Javascript

  1. Sample 1
    • CodeKit 1: 1.40 Seconds
    • CodeKit 2: 1.79 Seconds
  2. Sample 2
    • CodeKit 1: 1.28 Seconds
    • CodeKit 2: 1.61 Seconds
  3. Sample 3
    • CodeKit 1: 1.42 Seconds
    • CodeKit 2: 2.61 Seconds

Javascript compiling wasn't drastically different, but still felt lagged when comparing to CodeKit 1.

Specs

Editor: Espresso Mac: 2009 Mac Pro OS X: 10.9.1 Processor: 2 x 2.26 GHz Quad-Core Intel Xeon Memory: 16 GB 1066 MHz DDR3 ECC Hard Drive: Not an SSD or Hybrid drive.

Horttcore commented 10 years ago

I didn't made any tests but I had the same feeling, that compiling is a bit slower…

rpkoller commented 10 years ago

Hm with Sass and JS i have the direct opposite impression. On a large vertical rhythm and modular scale based project preprocessing took felt a minute while Codekit2 took only a fraction of time. I could stop the time later tonight when i have time to base my gut feeling with some plain numbers ;)

bdkjones commented 10 years ago

Couple things:

1) You need to verify that your file settings are exactly the same if you're going to compare CK1 and CK2. Are you running Autoprefixer on your Sass/Less? Are you creating a source map? Those options weren't available in CK1 and will add time to compiles.

2) Less 1.5+ ditched the YUI CSS compressor for something called "clean-css". It's slower. There's nothing I can do.

3) Have you reset the app by quitting it and holding down the shift key while relaunching? Do that to get a pristine state, then verify your file settings are EXACTLY identical between CK1 and CK2 and rerun your tests.

shshaw commented 10 years ago

@bdkjones

  1. The only new setting I was using was Autoprefixer. Unchecking that sped the compiling up by 0.25 seconds.
  2. This may be the main delay.
  3. Resetting the app saved around 0.5 - 1 seconds in CodeKit 2.

I know a lot has changed between versions, just wanted to make sure that there wasn't a setting or issue with my setup. At least this time scrollbars weren't the culprit. ;-)