> -----Original Message-----
> From: David Teran [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, April 15, 2002 0:16
> To:   [EMAIL PROTECTED]
> Subject:      [iText-questions] another optimization question
> 
> 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".
> 
        The work must be done somewhere.

> 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.
> 
        Conversion is always needed. Maybe for winansi something more
efficient could be made. I'll do some tests for this.

        Best Regards,
        Paulo Soares

> 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

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

Reply via email to