git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH (GITK) v2 4/4] gitk: Implement batch lookup and caching of encoding attrs.

From
Paul Mackerras <paulus@samba.org>
Date
Oct 11, 2008, 12:03 UTC
Message-ID
<18672.38422.200764.101389@cargo.ozlabs.ibm.com>
In-Reply-To
<200810111328.50951.angavrilov@gmail.com>
Alexander Gavrilov writes:
Show 8 quoted lines
> > And if [tcl_encoding] is slow, then it should have a cache.  There's
> > only likely to be at most 2 or 3 values it gets called for, and it's
> > a constant function.
> 
> In git-gui the slowdown appeared during the construction of the menu
> listing all available encodings, so a simple cache would not have helped. 
> I  reimplemented it using a lookup table to resolve aliases (constructed
> on the first run). But it can be thought of as a precalculated cache.

Hmmm, one that uses more time and memory than it needs to for gitk's use... I guess it's not a lot, but it still seems unnecessary, unless you can see a need for a menu of encodings in gitk.

Show 6 quoted lines
> > At this point, what I think I might do is apply your set of patches
> > (but with 2/4 and 3/4 folded into a single patch) and then go through
> > and do another commit that addresses the concerns I've raised.  OK?
> 
> Maybe I should resend the patches, scrapping path_encoding_cache,
> and adding the optimized version of tcl_encoding?
OK.
Paul.
Previous: Alexander GavrilovNext: Paul Mackerras
Message 10 of 12 in “Encoding support in GUI”
  1. 0/4 Encoding support in GUIAlexander Gavrilov, Sep 30, 2008
  2. 1/4 gitk: Port new encoding logic from git-gui.Alexander Gavrilov, Sep 30, 2008
  3. 2/4 gitk: Implement file contents encoding support.Alexander Gavrilov, Sep 30, 2008
  4. 3/4 gitk: Support filenames in the locale encoding.Alexander Gavrilov, Sep 30, 2008
  5. 4/4 gitk: Implement batch lookup and caching of encoding attrs.Alexander Gavrilov, Sep 30, 2008
  6. Paul MackerrasOct 10, 2008
  7. Alexander GavrilovOct 10, 2008
  8. Paul MackerrasOct 11, 2008
  9. Alexander GavrilovOct 11, 2008
  10. Paul MackerrasOct 11, 2008
  11. Paul MackerrasOct 10, 2008
  12. Paul MackerrasOct 10, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.