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

Re: [PATCH 0/3] fast textconv

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 30, 2010, 03:52 UTC
Message-ID
<7vtyryxy8r.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20100328145301.GA26213@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> The speedup is purely from caching; I am not using the "we only need to
> read the first part of the file" optimization.

This made me wonder if the end result might be easier to use if the interface does not change "textconv", but adds some property to the filter, i.e. "the output from this filter is stable and it is safe to reuse a cached conversion result for a given blob object", boolean. E.g.

        [diff "jpg"]
                textconv = exif
                textconv_stable = true

and let the calling side handle the caching. I further suspect that an unstable textconv filter would be an anomaly, so this could even be on by default.

If we do so, stock conversion filters people have accumulated in the past could be sped up without any additional change from the end user's side.

I guess that I am suggesting to postpone the potential speed-up that could come from being able to inspect the header information as a separate topic. Besides, some file format has metadata at the end, which won't help you.

About the caching scheme; to help invalidating the cache, it probably is a good idea to use not just the blob object name but also at least the name (command line) of the textconv filter as the key for the caching layer.

Instead of the "textconv_stable" boolean depicted above, you could add a "textconv_filter_version" variable there, compute a hash over blob object name, textconv filter name and textconv filter version, and use that as the key to look into the cache (filters lacking textconv_filter_version would then get no caching, and if you update your "exif" program you bump the "textconv_filter_version" variable).

Previous: Jeff KingNext: Jeff King
Message 18 of 19 in “fast textconv”
  1. 0/3 fast textconvJeff King, Mar 28, 2010
  2. 1/3 textconv: refactor calls to run_textconvJeff King, Mar 28, 2010
  3. 2/3 textconv: refactor to handle multiple textconv typesJeff King, Mar 28, 2010
  4. 3/3 diff: add "fasttextconv" config optionJeff King, Mar 28, 2010
  5. Johannes SixtMar 28, 2010
  6. Jeff KingMar 30, 2010
  7. diff: fix textconv error zombiesJohannes Sixt, Mar 30, 2010
  8. Junio C HamanoMar 30, 2010
  9. Johannes SixtMar 30, 2010
  10. Jeff KingMar 30, 2010
  11. Michael J GruberMar 28, 2010
  12. Jeff KingMar 28, 2010
  13. Jeff KingMar 28, 2010
  14. Jeff KingMar 28, 2010
  15. Jeff KingMar 28, 2010
  16. Sverre RabbelierMar 28, 2010
  17. Jeff KingMar 30, 2010
  18. Junio C HamanoMar 30, 2010
  19. Jeff KingMar 30, 2010

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.