PeterPanino / thtmlviewer

Automatically exported from code.google.com/p/thtmlviewer
Other
0 stars 0 forks source link

Nested tables slow down HtmlViewer. Can I preprocess the HTML? #411

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What is your question?

My main use of HTMLViewer is to display the content of emails. Qualitywise it 
does a good job but I'm now benchmarking it against HTPanel from 
delphihtmlcomponents.com. For the simpler stuff (eg plain text email wrapped in 
html tags) HTMLViewer is faster but when it comes to complex ones with lots of 
tables and graphics its slower. The worst case was HTMLViewer 40887 ticks vs 
HTPanel 78 ticks. More typically its between 1000 & 3000 ticks vs 90 - 300 ticks

The question is: Is there a way I can pre-process the html from the email to 
improve performance? The email server is homebrew so I can extract, process and 
store the message "easily".

I've attached the worst case html.

Which version of the product are you using? Which compiler version are you
using? On which operating system?

Version 11.4, Rad Studio 2006, W7x64

Please attach sample files and screenshots, if appropriate.

Original issue reported on code.google.com by Tirund...@gmail.com on 12 Jul 2015 at 7:26

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for spotting this issue.

The only way you can speed up processing the file is to reduce the number of 
nested tables. Obviously some tables are present only to produce the coloured 
frame.

I will see, how I can reduce the number of THtmlTable.DoLogic1 calls (currently 
about 90,000 times).

Original comment by OrphanCat on 19 Jul 2015 at 3:52

GoogleCodeExporter commented 9 years ago

Original comment by OrphanCat on 22 Jul 2015 at 9:32

GoogleCodeExporter commented 9 years ago
https://github.com/BerndGabriel/HtmlViewer/commit/5ae61acf6811ad78b90085bd3a5916
06d1a3db88 fixes this issue.

Original comment by OrphanCat on 22 Jul 2015 at 9:36