Comments (9)
I don't think that we can do anything to make it faster. This is the limitation of NodeJS and FS. NodeGit uses libgit library that is written in C, that's why it's probably faster.
But if you want to contribute and increase the performance of the library you're welcome to do so.
from isomorphic-git.
Hi @zFitness
I also experienced slow performance with huge repository.
After profiling the lib with my implementation it seemed the issue was located inside a small function massively called.
The fix has been integrated in v1.25.3.
Could you retry and see if it also fixed your use case ?
from isomorphic-git.
Hi @zFitness
I also experienced slow performance with huge repository. After profiling the lib with my implementation it seemed the issue was located inside a small function massively called. The fix has been integrated in v1.25.3.
Could you retry and see if it also fixed your use case ?您可以重试并看看它是否也修复了您的用例吗?关闭
Maybe it's a little fast, but it is faster to use the cache parameter
✓ isomorphic-git-cache (835 ms)
✓ isomorphic-git (12870 ms)
from isomorphic-git.
✓ isomorphic-git (13353 ms)
✓ node-git (132 ms)
✓ fs (51 ms)
✓ child_process (11518 ms)
from isomorphic-git.
Seems to be slower than child_process + git.
from isomorphic-git.
I don't think that we can do anything to make it faster. This is the limitation of NodeJS and FS. NodeGit uses libgit library that is written in C, that's why it's probably faster.
我认为我们无法采取任何措施来加快速度。这是 NodeJS 和 FS 的限制。 NodeGit 使用用 C 编写的 libgit 库,这就是它可能更快的原因。关闭
But if you want to contribute and increase the performance of the library you're welcome to do so.
ok, thanks
from isomorphic-git.
I don't think that we can do anything to make it faster. This is the limitation of NodeJS and FS. NodeGit uses libgit library that is written in C, that's why it's probably faster.
But if you want to contribute and increase the performance of the library you're welcome to do so.
Hello, I found that the cache parameter can improve the speed
await git1.readBlob({
fs: fs,
dir: projectDir,
oid,
cache,
filepath: file.replace(projectDir, ""),
});
Now, I implemented an exists function to determine whether files and directories exist under a branch.
Please optimize it for me.Thanks @jcubic
exists: async (path: string) => {
try {
await git.readBlob({
fs: fs,
dir: this.gitBasePath,
oid,
filepath: path.replace(this.gitBasePath, "").replace(/^\//, ""),
});
return true;
} catch (e) {
try {
await git.readTree({
fs: fs,
dir: this.gitBasePath,
oid,
filepath: path.replace(this.gitBasePath, "").replace(/^\//, ""),
});
return true;
} catch (e) {
return false;
}
}
},
from isomorphic-git.
Hi @zFitness
I also experienced slow performance with huge repository. After profiling the lib with my implementation it seemed the issue was located inside a small function massively called. The fix has been integrated in v1.25.3.
Could you retry and see if it also fixed your use case ?您可以重试并看看它是否也修复了您的用例吗?关闭
ok, i will retry
from isomorphic-git.
Nice, it probably means your use case was not dependent to the fix.
Cache works pretty well for you !
from isomorphic-git.
Related Issues (20)
- Improve `normalizePath` performance HOT 6
- pushing a tag to a target branch fail HOT 1
- Empty response from git server when using code bundler HOT 33
- Pushing returning 401 Error: No Anonymous Write Access HOT 6
- Tests are failing on Android HOT 15
- Cloning empty repository fails if git server uses git >= 2.41.0 HOT 5
- Getting a 404 with azure devops HOT 1
- not respecting server capabilities ( report-status ) HOT 1
- How can I abort a push operation on Node? AbortController seems to be not supported. HOT 2
- Codespell workflow needs approval
- Disable failing test that require credentials on Azure DevOps HOT 14
- Race condition makes it possible for a ref to be resolved to an empty string while it's in the middle of being updated HOT 16
- Invalid refs should throw HOT 11
- Isomorphic git functionality is broken on any browser
- Error Running Linter on main locally HOT 4
- Github Clone Broken on Latest Version HOT 6
- Pushing an annotated tag has slightly different behavior between isomorphic-git and Git HOT 1
- StatusMatrix results are different on Windows and Linux HOT 2
- Unchanged image/audio files being queued for commit with `git.add()` HOT 3
- BrowserFS deprecated HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from isomorphic-git.