Hi,

i do not know exactly if this would be possible, but it seems that about 
80% of the byte[] created while making a pdf report with itext are 
allocated in BaseFonts convertToBytes method:

return text.getBytes(encoding);

which in turn gets called a lot of times from the method "getWidth" and 
this one from "getWidthPoint".

I know that the encoding is important, but couldnt it be possible to 
check if the conversion is necessary or not? Would it always make a 
difference (for example between "MacRoman" and "Winansi") or just 
sometimes, under special circumstances.

If it would be possible to modify these methods, then really a lot of 
temporary objects could be eliminated. Also, the convert method takes 
about 28% of the whole CPU time, this combined with the saved temporary 
objects could increase performance for more than 30% and also would 
reduce memory footprint.

kind regards, david


_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to