文档章节

JGIT The clone appears to hang indefinitely

fdhay
 fdhay
发布于 2016/03/15 10:37
字数 474
阅读 117
收藏 0

https://www.eclipse.org/forums/index.php/t/261560/


Hello,

We're in the process of converting from SVN to GIT, and are running into a performance issue when cloning the repository with Eclipse/EGit. The clone appears to hang indefinitely

For various research and the below stack trace, the issue is related to large files in the repository. The specific file it is stuck on is a 48M (uncompressed) SQL script (there are subsequent files that are slightly larger, up to 72M uncompressed).

Have tried setting core.streamFileThreshold to various values (100m, 200m and finally 2047m) - in each case the behaviour is unchanged.

Have been unable to locate any information on how to correctly set core.streamFileThreshold through Eclipse; have been testing with it added to Team->Git->Configuration->User Settings. Adding it to the System Settings doesn't seem to take (on redisplay the value is not present).

Current test configuration (after trying many other permutations without success) is Eclipse 3.7.1 w/ EGit 1.1.0.201109151100-r on Windows 7, with Sun 64-bit JVM, 3G heap.


"Worker-8" prio=6 tid=0x000000000963f800 nid=0x12e8 runnable [0x00000000101af000]
java.lang.Thread.State: RUNNABLE
at java.util.zip.Inflater.inflateBytes(Native Method)
at java.util.zip.Inflater.inflate(Inflater.java:238)
- locked <0x0000000755f0a370> (a java.util.zip.ZStreamRef)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:135)
at java.util.zip.InflaterInputStream.skip(InflaterInputStream.java:191)
at java.io.BufferedInputStream.skip(BufferedInputStream.java:349)
- locked <0x00000007ec7b3b98> (a java.io.BufferedInputStream)
at org.eclipse.jgit.lib.ObjectStream$Filter.skip(ObjectStream.java:199)
at org.eclipse.jgit.util.IO.skipFully(IO.java:244)
at org.eclipse.jgit.storage.pack.DeltaStream.seekBase(DeltaStream.java:339)
at org.eclipse.jgit.storage.pack.DeltaStream.read(DeltaStream.java:213)
at org.eclipse.jgit.storage.pack.DeltaStream.read(DeltaStream.java:214)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
- locked <0x000000075657a338> (a java.io.BufferedInputStream)
at org.eclipse.jgit.util.io.TeeInputStream.read(TeeInputStream.java:111)
at org.eclipse.jgit.lib.ObjectStream$Filter.read(ObjectStream.java:209)
at java.io.InputStream.read(InputStream.java:82)
at org.eclipse.jgit.lib.ObjectLoader.copyTo(ObjectLoader.java:254)
at org.eclipse.jgit.dircache.DirCacheCheckout.checkoutEntry(DirCacheCheckout.java:936)
at org.eclipse.jgit.dircache.DirCacheCheckout.doCheckout(DirCacheCheckout.java:447)
at org.eclipse.jgit.dircache.DirCacheCheckout.checkout(DirCacheCheckout.java:380)
at org.eclipse.jgit.api.CloneCommand.checkout(CloneCommand.java:225)
at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:120)
at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:142)
at org.eclipse.egit.ui.internal.clone.GitCloneWizard.executeCloneOperation(GitCloneWizard.java:306)
at org.eclipse.egit.ui.internal.clone.GitCloneWizard.access$3(GitCloneWizard.java:299)
at org.eclipse.egit.ui.internal.clone.GitCloneWizard$5.run(GitCloneWizard.java:278)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)



ok, you found the best info on this topic: http://dev.eclipse.org/mhonarc/lists/jgit-dev/msg00689.html explains quite well a possible reason for your performance problem. Strange is why it doesn't help to set core.streamFileThreshold to something big. Did you try the repack with -f and have the -delta gitattribute set? This has helped here: http://dev.eclipse.org/mhonarc/lists/jgit-dev/msg00694.html 


Ciao

Chris

Report message to a moderator

   

- Re: Performance issue with large files [message #755454 is a reply to message #755327] Tue, 08 November 2011 14:59 Go to previous message

Chris Lee is currently offline Chris LeeFriend

Messages: 6

Registered: November 2011

Junior Member


That worked.


Added this to <repo>/info/attributes:

Quote:


*.sql -delta

*.zip -delta

*.jpg -delta

*.gif -delta

*.png -delta

*.doc -delta

*.docx -delta

*.pdf -delta



Repacked using:

Quote:


git repack -f -a -d --depth=250 --window=250



...and can now successfully clone from EGit.


Thx.


本文转载自:https://www.eclipse.org/forums/index.php/t/261560/

fdhay
粉丝 11
博文 69
码字总数 2796
作品 0
成都
高级程序员
私信 提问
JGit 源码介绍

JGit 是一个纯Java类库,实现了Git版本控制系统。它是一个Eclipse项目,最初是由作为Git库的Egit起始的,提供了将Git集成到Eclipse中的功能。同时JGit进一步被 Gerrit,GitBlit 以及 Jenkin...

donhui
2014/11/07
5.2K
2
JGit 2.2 发布,Git 的 Java 开发包

JGit 是一个轻量级纯Java的类库,用来实现 Git 的版本控制系统的访问,以及提供核心的版本控制算法。EGit 这个 Eclipse 上的 Git 插件就是采用 JGit 开发的。 JGit 2.2 包含众多改进,详情请...

oschina
2012/12/25
1K
2
2017-5-3工作总结

5月3日 上午:学习jsch的使用、并利用它使用各种git命令。学习java操作ftp,并向ftp提交内容: 1、发现jgit可以直接操作git、而jsch也可以用来操作文件传输。尝试修改之前的方案,使用jgit代...

vomou
2017/05/03
2
2
Java 实现Git拉包 maven打包项目

开发过程中遇到这样的需求,Java拉取指定代码库指定分支的代码java代码,然后有maven打包,将打包好的jar上传到文件服务器。 解决思路分三步: 1.从Git仓库下载代码文件 2.用maven打包下载好...

MrPei
2018/08/14
185
0
用 JGit 初始化 Git 库

最近,我被问及如何用 JGit 来初始化一个新的 Git 库,比如实现初始化一个库 /path/to/repodoes。 当我用 JGit 来创建库时其实并不难,这里有些细节值得提一提。因为在网上几乎少有关于这个主...

oschina
2015/05/07
5K
0

没有更多内容

加载失败,请刷新页面

加载更多

SIPC的保全存证变现应用才是先见之明

Facebook发起的Libra在接连退群后终于在联盟链上线前官宣成立联盟,同时Telegram公链TON在主网上线前被美国SEC要求退回私募非法所得。两个都拥有活跃用户数上亿的社交平台,一个以1000万美元...

SimpleChain
17分钟前
2
0
Node_初步了解(3)回调,作用域,上下文

本文转载于:专业的前端网站➧Node_初步了解(3)回调,作用域,上下文 1. 1 //回调:回调是异步编程最基本的方法,node.js需要按顺序执行异步逻辑的时候,一般采用后续传递的方式,将后续逻辑...

前端老手
17分钟前
2
0
好程序员Java教程分享Java的五大特点

好程序员Java教程为大家分享Java的五大特点希望对初学者有所帮助。 一、Java的(五大)特点: 1.简单性 相对于c语言来说 c语言的核心 指针(保存地址)*p Java中没有指针的概念(使用的是引用概念...

好程序员官网
19分钟前
2
0
移动端rem适配各种屏幕字体

在页面中引入这个js文件,可以实现各个屏幕的字体自适应: (function (doc, win) { var docEl = doc.documentElement, resizeEvt = 'orientationchange' in window ? 'orientationchange' : ......

流年那么伤
21分钟前
3
0
2019我最喜爱的绿色应用活动投票开始,谁能突出重围?

在去年第一届软件绿色联盟开发者大会上,共有36个绿色应用荣获“2018年度我最喜爱的绿色应用”奖项。活动得到了消费者、开发者与应用厂商的一致好评,刚过完十一假期就有小伙伴们后台留言,问...

软件绿色联盟
32分钟前
5
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部