git diff too slow for a file

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: SungHyun Nam
Date: Sunday, March 28, 2010 - 6:42 pm

Hello,

If I run a attached script for bunzipped attached files, I get:
(To reduce size, I removed many lines and bzipped.)

     $ ./mk.sh
     time diff -u x3 x4 >/dev/null 2>&1

     real	0m0.011s
     user	0m0.000s
     sys	0m0.010s

     time git diff >/dev/null 2>&1

     real	0m0.193s
     user	0m0.190s
     sys	0m0.000s

     $ git version
     git version 1.7.0.2.273.gc2413

     $ diff --version
     diff (GNU diffutils) 2.8.1
     ...

Well, though the files are ascii file, they includes a random
hexa-decimal datas, so that I don't interest the diff result at
all.  But the real problem is 'rebasing took so long if the file
was changed'.  Because the git tree includes several such a file,
if they changed, rebase took some miniutes for every branch.
Such a branch includes a few lines of changes for a C source file,
though.  Now I'm waiting an hour to finish rebasing all the
branches and yet a rebasing script is running... :-(

Please help!
Thanks,
namsh

The original file has more than 180000 lines and the result is:
     $ ./mk.sh
     time diff -u x3 x4 >/dev/null 2>&1

     real	0m0.759s
     user	0m0.740s
     sys	0m0.010s

     time git diff >/dev/null 2>&1

     real	0m44.460s
     user	0m44.390s
     sys	0m0.030s
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
git diff too slow for a file, SungHyun Nam, (Sun Mar 28, 6:42 pm)
Re: git diff too slow for a file, René Scharfe, (Sat Apr 17, 8:52 am)
Re: git diff too slow for a file, Junio C Hamano, (Sat Apr 17, 10:10 am)
Re: git diff too slow for a file, René Scharfe, (Sun Apr 18, 11:01 am)
Re: git diff too slow for a file, SungHyun Nam, (Sun Apr 18, 5:43 pm)
Re: git diff too slow for a file, Junio C Hamano, (Tue Apr 20, 12:40 am)
Re: git diff too slow for a file, René Scharfe, (Tue Apr 20, 2:15 pm)
Re: git diff too slow for a file, Junio C Hamano, (Tue Apr 20, 7:49 pm)
Re: git diff too slow for a file, René Scharfe, (Sun May 2, 6:04 am)
Re: git diff too slow for a file, Junio C Hamano, (Sun May 2, 8:10 am)
Re: git diff too slow for a file, René Scharfe, (Tue May 4, 1:16 pm)
Re: git diff too slow for a file, Junio C Hamano, (Tue May 4, 3:56 pm)