[Po4a-commits] "po4a changelog,1.173,1.174"

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Fri Feb 16 20:13:02 CET 2007


Update of /cvsroot/po4a/po4a
In directory alioth:/tmp/cvs-serv11129

Modified Files:
	changelog 
Log Message:
Various speedup based on avoiding Encode::from_to, which spends 40% of its
time in find_encoding. As the encoding of the input file, output file and
po files do not change a lot, it's faster to keep the encoders in the
Transtractor or Po objects.


Index: changelog
===================================================================
RCS file: /cvsroot/po4a/po4a/changelog,v
retrieving revision 1.173
retrieving revision 1.174
diff -u -d -r1.173 -r1.174
--- changelog	16 Feb 2007 10:42:58 -0000	1.173
+++ changelog	16 Feb 2007 19:13:00 -0000	1.174
@@ -1,5 +1,22 @@
 2007-02-16  Nicolas François  <nicolas.francois at centraliens.net>
 
+	Encode::from_to spends 40% of its time in find_encoding. As the
+	encoding of the input file, output file and po files do not change
+	a lot, it's faster to keep the encoders in the Transtractor or Po
+	objects.
+	* lib/Locale/Po4a/Transtractor.pm: Use detected_charset to change
+	the charset, even in the initialization (in process()).
+	* lib/Locale/Po4a/Transtractor.pm: Add a file_out_encoder
+	* lib/Locale/Po4a/Transtractor.pm (encode_from_to): New function
+	to replace Encode::from_to.
+	* lib/Locale/Po4a/Transtractor.pm: Replace some occurences of
+	Encode::from_to by encode_from_to, when the encoders are known.
+	* lib/Locale/Po4a/Po.pm: add an 'encoder' field to the po
+	structure. It defaults to find_encoding("ascii"), and is changed
+	every time the header's charset is changed.
+
+2007-02-16  Nicolas François  <nicolas.francois at centraliens.net>
+
 	* lib/Locale/Po4a/Man.pm (post_trans, parse): Cache the result
 	when we convert a non-breaking space to its representation in the
 	input and output charset.




More information about the Po4a-commits mailing list