Bug 440586 - Special character slows down git browsing when using GTK
Summary: Special character slows down git browsing when using GTK
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-releng (show other bugs)
Version: 8.4.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Marc Khouzam CLA
QA Contact: Vivian Kong CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-28 15:15 EDT by Marc Khouzam CLA
Modified: 2014-08-01 10:16 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Khouzam CLA 2014-07-28 15:15:09 EDT
If you use GTK and you expand the 'tags' folder in the Git Repositories view, and you scroll down, you will notice a dramatic slow down.  It turns out GTK has problems trying to display some special characters, in this case <U+0093>.  We have a tag that points to such a commit.  The tag is CDT_3_0_1_RC1 and points to e3c908217aba9dc585fcd3b2689f5f64009978d8.

Commit ca2e8c288e0d3b7b382d3418afbe110662fcfed4 also has the bad character.

These commit date back to 2005 and are rarely visible in the history view.  However, because of the tag, the tag list is very slow.

To fix this annoying situation I suggest:
1- remove the tag CDT_3_0_1_RC1 which does not seem very important as it is for RC1.
or, if it is better to keep the tag
2- rename it to 'zCDT_3_0_1_RC1' so it appears at the bottom of the list
Comment 1 Marc Khouzam CLA 2014-07-28 15:15:49 EDT
Doug, what do you think #1 (remove CDT_3_0_1_RC1) or #2 (rename it)?
Comment 2 Marc-André Laperle CLA 2014-07-28 15:41:22 EDT
For the record, it does seem GTK specific indeed. I just tried on cocoa (OSX) and it just skips those characters.
Comment 3 Marc Khouzam CLA 2014-07-30 07:58:40 EDT
(In reply to Marc Khouzam from comment #1)
> Doug, what do you think #1 (remove CDT_3_0_1_RC1) or #2 (rename it)?

I'm going to go ahead and remove the tag.
This is the commit id, if we want to recreate it: e3c908217aba9dc585fcd3b2689f5f64009978d8
Comment 4 Marc Khouzam CLA 2014-07-30 08:12:33 EDT
I remove the tag from the golden repo, but I also had to manually remove it from my own repo.  I'm not sure how git syncs the tags when they get deleted.

It all goes fast now when I scroll the tags, but other may have to delete that tag locally.  I'll send an email if I can't figure out how to get git to sync things directly.
Comment 5 Marc Khouzam CLA 2014-08-01 07:12:38 EDT
(In reply to Marc Khouzam from comment #4)
> I remove the tag from the golden repo, but I also had to manually remove it
> from my own repo.  I'm not sure how git syncs the tags when they get deleted.
> 
> It all goes fast now when I scroll the tags, but other may have to delete
> that tag locally.  I'll send an email if I can't figure out how to get git
> to sync things directly.

The way to delete tags that are no longer on the remote is:

git fetch --prune --tags origin
Comment 6 Andrew Eidsness CLA 2014-08-01 08:41:33 EDT
Not sure if this is related, but my own scripts have had problems with a character in commit a857bb18.

My "fix" (not sure if it was a work around or a fix) is to "export LANG=" at the top of the script (before looking at the repo).

I don't remember the details of the problem, but it was related to UTF-8 vs. ISO-8859-1 character handling.  From memory I think that the commit was created with one encoding and the repo assumes the other.
Comment 7 Marc Khouzam CLA 2014-08-01 10:16:00 EDT
(In reply to Andrew Eidsness from comment #6)
> Not sure if this is related, but my own scripts have had problems with a
> character in commit a857bb18.
> 
> My "fix" (not sure if it was a work around or a fix) is to "export LANG=" at
> the top of the script (before looking at the repo).

I didn't get any luck with this. Maybe I'm doing it wrong.
Are you able to try it yourself?
On Linux, you should still see the slowdown if you go to the following commit in the history view: e3c908217aba9dc585fcd3b2689f5f64009978d8