GitHub user 1ambda opened a pull request:

    https://github.com/apache/zeppelin/pull/1812

    [ZEPPELIN-1850] Use yarn instead of npm to reduce build time

    ### What is this PR for?
    
    This PR is about using [yarn](https://yarnpkg.com/) which is ultra fast 
than npm.
    
    As you can see, we can reduce almost 50 sec
    
    ### What type of PR is it?
    [Improvement]
    
    ### Todos
    * [x] - Setup `pom.xml` to download, use yarn
    * [x] - Update `README.md`
    
    ### What is the Jira issue?
    
    [ZEPPELIN-1850](https://issues.apache.org/jira/browse/ZEPPELIN-1850)
    
    ### How should this be tested?
    
    - Run this command to compare build time in master and pr branch
    
    `rm -rf zeppelin-web/bower_components zeppelin-web/node 
zeppelin-web/node_modules; mvn clean package -pl 'zeppelin-web' -DskipTests`
    
    - If you want to compare `npm install` and `yarn install` only, 
    
    First remove this line in package.json `"postinstall": "bower install 
--silent && grunt googlefonts",`
    And then, execute `npm install` and `yarn install` respectively 
    
    ### Screenshots (if appropriate)
    
    ```
    ## before
    [INFO] BUILD SUCCESS
    [INFO] 
------------------------------------------------------------------------
    [INFO] Total time: 02:49 min
    [INFO] Finished at: 2016-12-29T01:28:34+09:00
    [INFO] Final Memory: 37M/1239M
    [INFO] 
------------------------------------------------------------------------
    mvn clean package -pl 'zeppelin-web' -DskipTests  138.69s user 46.12s 
system 107% cpu 2:51.21 total
    
    ## after
    [INFO] BUILD SUCCESS
    [INFO] 
------------------------------------------------------------------------
    [INFO] Total time: 02:02 min
    [INFO] Finished at: 2016-12-29T01:34:02+09:00
    [INFO] Final Memory: 49M/1259M
    [INFO] 
------------------------------------------------------------------------
    mvn clean package -pl 'zeppelin-web' -DskipTests  102.03s user 43.56s 
system 117% cpu 2:03.78 total
    ```
    
    Also, I tested `npm install` and `yarn install` only
    
    ```
    ## before
    npm install  36.05s user 11.38s system 114% cpu 41.540 total
    
    ## after
    yarn  12.90s user 11.42s system 163% cpu 14.884 total
    ```
    
    ### Questions:
    * Does the licenses files need update - NO
    * Is there breaking changes for older versions - NO
    * Does this needs documentation? - YES, I updated


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/1ambda/zeppelin ZEPPELIN-1850/use-yarn

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zeppelin/pull/1812.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1812
    
----
commit 8502890c70338e8e7541c8dc9a2ca8c968ddecb5
Author: 1ambda <1am...@gmail.com>
Date:   2016-12-28T16:36:42Z

    feat: Use yarn instead of npm

commit da8f0021e1b5150f44926afbd2c4e3cb3452e17f
Author: 1ambda <1am...@gmail.com>
Date:   2016-12-28T16:42:28Z

    docs: Update README.md

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to