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

Performance improvement on LLVM build time #20

Closed

Conversation

renatoalencar
Copy link
Contributor

Do a shallow clone using --shallow-since flag
in order to spend less time cloning the LLVM repo.
The LLVM repo is huge, which leads to a 400+ MB
directory, and it takes a reasonable time to clone
the repository.

Adding a --shallow-since flag using the date
before the desired revision led to a performance
improvement of 4x cloning the repo.

The 8 Oct 2018 date is the day before the desired
revision specified in the code.

My local tests:

Without shallow clone:

renato@renato-data-tmp:/tmp$ time git clone https://github.com/llvm-mirror/llvm.git
Cloning into 'llvm'...
remote: Enumerating objects: 166, done.
remote: Counting objects: 100% (166/166), done.
remote: Compressing objects: 100% (134/134), done.
remote: Total 1726648 (delta 52), reused 65 (delta 32), pack-reused 1726482
Receiving objects: 100% (1726648/1726648), 425.35 MiB | 9.27 MiB/s, done.
Resolving deltas: 100% (1418304/1418304), done.
Checking out files: 100% (38646/38646), done.

real	3m40.953s
user	4m38.279s
sys	0m10.589s

With shallow clone:

renato@renato-data-tmp:/tmp$ time git clone --shallow-since 2018-10-08 https://github.com/llvm-mirror/llvm.git llvm-2
Cloning into 'llvm-2'...
remote: Enumerating objects: 168108, done.
remote: Counting objects: 100% (168108/168108), done.
remote: Compressing objects: 100% (61767/61767), done.
Receiving objects: 100% (168108/168108), 91.62 MiB | 9.57 MiB/s, done.
remote: Total 168108 (delta 117253), reused 137482 (delta 104959), pack-reused 0
Resolving deltas: 100% (117253/117253), done.
Checking connectivity: 168108, done.
Checking out files: 100% (38646/38646), done.

real	0m52.412s
user	0m39.649s
sys	0m3.658s

Do a shallow clone using `--shallow-since` flag
in order to spend less time cloning the LLVM repo.
The LLVM repo is huge, which leads to a 400+ MB
directory, and it takes a reasonable time to clone
the repository.

Adding a `--shallow-since` flag using the date
before the desired revision led to a performance
improvement of 4x cloning the repo.
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jul 11, 2019
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@dulinriley has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@dulinriley merged this pull request in 4233d4f.

@renatoalencar renatoalencar deleted the llvm-build-improvement branch July 13, 2019 18:37
facebook-github-bot pushed a commit that referenced this pull request Oct 28, 2019
Summary:
- Change the static_assert to allow JavaClass types.
- Change pointer cast in getElement to use JniType.
- In setElement, use new toPlainJniReference that converts JavaClass
  values to plain JNI references using ReprAccess.
- NOTE: Maybe we should do this last one in JMethod::operator() as well,
  since it currently passes JavaClass values directly to env->Invoke*

Pull Request resolved: facebookincubator/fbjni#20

Test Plan: CI

Reviewed By: mhorowitz

Differential Revision: D18121242

Pulled By: dreiss

fbshipit-source-id: 634e92ab55a3bbf05efac5ac61193fb27f4d1445
@whatleo whatleo mentioned this pull request Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants