[Thunar-workers] [DokuWiki] page changed: implementation:mime-glob-match
thunar-workers at xfce.org
thunar-workers at xfce.org
Tue Mar 8 21:16:26 CET 2005
A page in your DokuWiki was added or changed. Here are the details:
Date : 2005/03/08 20:16
Browser : Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050122 Firefox/1.0
IP-Address : 217.85.185.87
Hostname : pD955B957.dip.t-dialin.net
Old Revision: http://thunar.xfce.org/wiki/implementation:mime-glob-match?rev=1110309126
New Revision: http://thunar.xfce.org/wiki/implementation:mime-glob-match
Edit Summary: fix typos
User : benny
@@ -69,9 +69,9 @@
wildcards, but only printable characters in the UTF-8 encoding, for
example ''README'' is such a pattern, or ''.DirIcon''.
The Shared MIME Database contains only a few literal patterns (10 literal
- patterns in ''shared-mime-info-0.15'') and it is unlikely that vendor will
+ patterns in ''shared-mime-info-0.15'') and it is unlikely that vendors will
add many literal patterns. Therefore we should go with a simple string
comparison here. The important fact is that we need to sort the list of
literal patterns by their length to make sure we check the longest pattern
first.
@@ -99,20 +99,20 @@
</code>
Since the average filename is longer than 10 characters, but
the longest literal pattern in the Shared MIME Database (as of
- version ''0.15'') is only 8 characters long, the implementation
+ version ''0.15'') has only 8 characters, this implementation
will stop with ''no_match'' after the first comparison in many
cases, and we won't waste CPU cycles while comparing patterns
that cannot match.
The //list view// above is just to illustrate the concept. The
implementation should use an array to handle the patterns. Since
the pattern strings are of variable length, we cannot simple use
a C array here; but instead we'll use a large memory chunk (which
- will also include the Simple Patterns) to reduce heap fragementation
- and increase locality, and store the pattern data byte-by-byte, maybe
- different depending on the platform (data alignment!).
+ will also include the Simple Patterns) to reduce **heap fragmentation**
+ and increase **data locality**, and store the pattern data depending
+ on the platform (data alignment!).
:!: More research required.
--
This mail was generated by DokuWiki at
http://thunar.xfce.org/wiki/
More information about the Thunar-workers
mailing list