Polymer / tools

Polymer Tools Monorepo
BSD 3-Clause "New" or "Revised" License
430 stars 200 forks source link

Performance of PolymerCli #3458

Open jogibear9988 opened 5 years ago

jogibear9988 commented 5 years ago

A Build with following options: (polymer.json)

{
  "sources": [
   "dist/**",
   "assets/resources/**",
   "assets/images/**"
  ],
  "extraDependencies": [],
  "builds": [
    {
      "name": "HTML",
      "browserCapabilities": ["es2015", "push", "serviceworker", "modules"],
      "html": { "minify": true},
      "css": { "minify": true},
      "js": { "minify": true, "compile": false},
      "bundle": {             
        "exclude": ["../libs/stimulsoft/" ], 
        "inlineCss": false,          
        "inlineScripts": true,       
        "rewriteUrlsInTemplates": false, 
        "sourcemaps": false,          
        "stripComments": true   
      },
      "addServiceWorker": false,
      "addPushManifest": false
    }
  ],
  "moduleResolution": "node",
  "npm": true,
  "lint": {
    "rules": [
      "polymer-3"
    ]
  }
}

and following command

 call node --max-old-space-size=6144 node_modules\polymer-cli\bin\polymer build --verbose --root ../../bin/Debug/HTML --entrypoint index.html

needs about 25minutes (and I've to do it 3 times, cause I have 3 different html files)

Is there a way to increase this speed?

smashah commented 5 years ago

Mines just failed with a FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - Javascript heap out of memory on two separate systems.

I set bundle: false and it worked perfectly fine.

jogibear9988 commented 5 years ago

yes, but then it‘s not bundeled...

smashah commented 5 years ago

@jogibear9988 this worked for me: https://github.com/fsevents/fsevents/issues/282#issuecomment-532378923

Upgrade to node 12

jogibear9988 commented 5 years ago

does this also increase performance?

paresy commented 5 years ago

We are seeing the same issue. Build times are increasing beyond sane limits.

smashah commented 5 years ago

No it doesn't increase performance. Still 3+ minutes up from usual. I'm going to try implement open-wc build suggestions soon-ish.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.