Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

area/circleci: Speed up circleci build process for branches and pr #16778

Merged
merged 38 commits into from
May 1, 2019

Conversation

briangann
Copy link
Contributor

What this PR does / why we need it:

Build times for branches and pull requests are slow

Special notes for your reviewer:

This is focused on streamlining the PR process by speeding up builds in circleci

@bergquist
Copy link
Contributor

Love it!

@torkelo
Copy link
Member

torkelo commented Apr 26, 2019

Yes love it as well, discussed doing this kind of change with @xlson a couple of weeks ago and we both agreed that this was a good idea!

@xlson
Copy link
Contributor

xlson commented Apr 26, 2019

Nice work @briangann! Looks like you'll be able to merge build.s and build-all.sh into one file pretty soon as well as speeding up the build a lot.

@briangann
Copy link
Contributor Author

Nice work @briangann! Looks like you'll be able to merge build.s and build-all.sh into one file pretty soon as well as speeding up the build a lot.

Looks possible. I'm looking for any other areas that can be done in parallel, or anything that will benefit from caching result.

@xlson
Copy link
Contributor

xlson commented Apr 26, 2019

It looks like you've covered most things right now. It would be great if we could parallelize the frontend build somehow.

@briangann
Copy link
Contributor Author

briangann commented Apr 26, 2019

It looks like you've covered most things right now. It would be great if we could parallelize the frontend build somehow.

definitely room for optimization in the frontend, will work on that next.

the frontend-test take a long time also, will see if that can be split up.

@briangann
Copy link
Contributor Author

the frontend build spends the majority of the time in webpack (linting takes about 8 seconds of that time)

@briangann
Copy link
Contributor Author

build time is now down from 21 minutes to 12 minutes :)

@bergquist
Copy link
Contributor

Great work! Any chance we can merge this first and iterate more in other PR's? You can always base the new PR on this branch so you can start now without waiting.

@briangann briangann marked this pull request as ready for review April 30, 2019 03:21
@briangann
Copy link
Contributor Author

adding the webpack speed measurement plugin shows this (for future speedup work)

 SMP  ⏱
General output time took 3 mins, 38.095 secs

 SMP  ⏱  Plugins
TerserPlugin took 2 mins, 30.62 secs
ngAnnotatePlugin took 2 mins, 26.66 secs
HtmlWebpackPlugin took 6.48 secs
OptimizeCssAssetsWebpackPlugin took 4.69 secs
SpeedMeasurePlugin took 2.65 secs
MiniCssExtractPlugin took 0.726 secs
ForkTsCheckerWebpackPlugin took 0.05 secs

 SMP  ⏱  Loaders
modules with no loaders took 26.41 secs
  module count = 1913
css-loader, and
postcss-loader, and
sass-loader took 26.29 secs
  module count = 10
expose-loader, and
expose-loader took 22.19 secs
  module count = 2
ts-loader, and
tslint-loader took 20.81 secs
  module count = 792
mini-css-extract-plugin, and
css-loader, and
postcss-loader, and
sass-loader took 4.6 secs
  module count = 2
ngtemplate-loader, and
html-loader took 3.027 secs
  module count = 137
html-webpack-plugin took 0.027 secs
  module count = 2

Copy link
Contributor

@xlson xlson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I agree with @bergquist, let's merge it.

Copy link
Contributor

@bergquist bergquist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@briangann briangann merged commit 157f330 into grafana:master May 1, 2019
@briangann briangann deleted the 20190426_circleci_speedup branch May 1, 2019 15:20
ryantxu added a commit to ryantxu/grafana that referenced this pull request May 1, 2019
* grafana/master:
  prometheus: fix regression after adding support for tracing headers (grafana#16829)
  area/circleci: Speed up circleci build process for branches and pr (grafana#16778)
ryantxu added a commit to ryantxu/grafana that referenced this pull request May 1, 2019
* grafana/master:
  FormLabel: allow any rather than just a string for tooltip (grafana#16841)
  prometheus: fix regression after adding support for tracing headers (grafana#16829)
  area/circleci: Speed up circleci build process for branches and pr (grafana#16778)
ryantxu added a commit to ryantxu/grafana that referenced this pull request May 1, 2019
* grafana/master:
  FormLabel: allow any rather than just a string for tooltip (grafana#16841)
  prometheus: fix regression after adding support for tracing headers (grafana#16829)
  area/circleci: Speed up circleci build process for branches and pr (grafana#16778)
  DataProxy: Restore Set-Cookie header after proxy request (grafana#16838)
  docs: clarify page parameter version support for folder/dashboard search (grafana#16836)
  Chore: revise some of the gosec rules (grafana#16713)
  Refactor: consistant plugin/meta usage (grafana#16834)
ryantxu added a commit to ryantxu/grafana that referenced this pull request May 2, 2019
* grafana/master:
  FormLabel: allow any rather than just a string for tooltip (grafana#16841)
  prometheus: fix regression after adding support for tracing headers (grafana#16829)
  area/circleci: Speed up circleci build process for branches and pr (grafana#16778)
  DataProxy: Restore Set-Cookie header after proxy request (grafana#16838)
  docs: clarify page parameter version support for folder/dashboard search (grafana#16836)
  Chore: revise some of the gosec rules (grafana#16713)
  Refactor: consistant plugin/meta usage (grafana#16834)
  Explore: Use SeriesData format for loki/logs (grafana#16793)
  Refactor: move NavModel to @grafana/ui (grafana#16813)
ryantxu added a commit to ryantxu/grafana that referenced this pull request May 2, 2019
* grafana/master: (27 commits)
  FormLabel: allow any rather than just a string for tooltip (grafana#16841)
  prometheus: fix regression after adding support for tracing headers (grafana#16829)
  area/circleci: Speed up circleci build process for branches and pr (grafana#16778)
  DataProxy: Restore Set-Cookie header after proxy request (grafana#16838)
  docs: clarify page parameter version support for folder/dashboard search (grafana#16836)
  Chore: revise some of the gosec rules (grafana#16713)
  Refactor: consistant plugin/meta usage (grafana#16834)
  Explore: Use SeriesData format for loki/logs (grafana#16793)
  Refactor: move NavModel to @grafana/ui (grafana#16813)
  Auth: Enable retries and transaction for some db calls for auth tokens  (grafana#16785)
  Provisioning: Show file path of provisioning file in save/delete dialogs (grafana#16706)
  Add tracing headers for prometheus datasource (grafana#16724)
  Config: Fixes bug where timeouts for alerting was not parsed correctly (grafana#16784)
  build: removes gopkg files from dev docker file (grafana#16817)
  Provisioning: Trying to fix failing test (grafana#16800)
  Table: React table fix rotate support in storybook (grafana#16816)
  TestData: add log level in dummy message (grafana#16815)
  removes gopkg.lock from root folder
  Explore: Support user timezone (grafana#16469)
  Plugins: rename vizPlugin to panelPlugin (grafana#16802)
  ...
ryantxu added a commit to ryantxu/grafana that referenced this pull request May 3, 2019
…MetricPanelCtrl

* grafana/master: (24 commits)
  CSV: escape quotes in toCSV  (grafana#16874)
  Dashboard: Lazy load out of view panels (grafana#15554)
  LDAP: Added reload endpoint for LDAP config (grafana#15470)
  PluginsList: Removed icons and updated snapshots (grafana#16872)
  Panels: Fixed issue with panel type change and data updates (grafana#16871)
  Chore: fix modes for non-executable files (grafana#16864)
  DataSourceSettings: Minor fix for uncontrolled input (grafana#16863)
  Chore: Lowered implicit anys limit to 5623
  TestData: Add dashboards to testdata (grafana#16855)
  Input Datasource: convert from angular config to react ConfigEditor (grafana#16856)
  DataSources: minor typescript cleanups and comments (grafana#16860)
  TestDataDatasource: Add config editor (grafana#16861)
  App Plugins: support react pages and tabs (grafana#16586)
  Add Windows MSI generation to build process (grafana#16502)
  Datasources: add support for POST HTTP verb for InfluxDB (grafana#16690)
  Add pattern validation in configs (grafana#16837)
  Search: Enable filtering dashboards in search by current folder (grafana#16790)
  FormLabel: allow any rather than just a string for tooltip (grafana#16841)
  prometheus: fix regression after adding support for tracing headers (grafana#16829)
  area/circleci: Speed up circleci build process for branches and pr (grafana#16778)
  ...
ryantxu added a commit to ryantxu/grafana that referenced this pull request May 3, 2019
* grafana/master: (44 commits)
  CSV: escape quotes in toCSV  (grafana#16874)
  Dashboard: Lazy load out of view panels (grafana#15554)
  LDAP: Added reload endpoint for LDAP config (grafana#15470)
  PluginsList: Removed icons and updated snapshots (grafana#16872)
  Panels: Fixed issue with panel type change and data updates (grafana#16871)
  Chore: fix modes for non-executable files (grafana#16864)
  DataSourceSettings: Minor fix for uncontrolled input (grafana#16863)
  Chore: Lowered implicit anys limit to 5623
  TestData: Add dashboards to testdata (grafana#16855)
  Input Datasource: convert from angular config to react ConfigEditor (grafana#16856)
  DataSources: minor typescript cleanups and comments (grafana#16860)
  TestDataDatasource: Add config editor (grafana#16861)
  App Plugins: support react pages and tabs (grafana#16586)
  Add Windows MSI generation to build process (grafana#16502)
  Datasources: add support for POST HTTP verb for InfluxDB (grafana#16690)
  Add pattern validation in configs (grafana#16837)
  Search: Enable filtering dashboards in search by current folder (grafana#16790)
  FormLabel: allow any rather than just a string for tooltip (grafana#16841)
  prometheus: fix regression after adding support for tracing headers (grafana#16829)
  area/circleci: Speed up circleci build process for branches and pr (grafana#16778)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants