New topic in General: StyledText (EditField) Paragraph performance problem
wradgio - Sun Mar 30, 2008 7:24 am <http://forums.realsoftware.com/viewtopic.php?t=21525> Hi folks, i'm developing converter, that makes valid HTML from RB StyledText. Everything was going fine, until i have found a problem, that makes me trouble. That problem comes from paragraphs - it takes long time to get any parameter of it if you have more of them. That wouldn't be such a problem - i can make my own faster code for making paragraphs array and it's parameters. But there is one important paragraph value, that i can't get without using Paragraph class of StyledText - Alignment. Now imagine i use my converter in application, where StyledText is converted instantly when user clicks to see HTML code. If i have text with about 50 paragraphs, the conversion takes about 12 seconds. Try to wait 12 seconds - it can be too long for user. I have also tried 100 paragraphs and it took almot 1 minute. I have also created an example, where you can see how time is growing as number of paragraphs grow - you can download it from http://www.whian.net/p_counter.rbp.zip Investigating problem, i have found that more paragraphs are used in StyledText class, more time it takes to get value of the last paragraph. That sounds strange to me. Why doesn't it remember last position and start from there? But maybe i'm missing something, so i'm asking here - do you guys know, how to solve this? Maybe you know some way, to get paragraphs' values faster or get aligment without using Paragraph class, or something else. _________________ Marcel Zúbrik aka MacO - unknown life form http://www.cw.sk/
-- Over 900 classes with 18000 functions in one REALbasic plug-in. The Monkeybread Software Realbasic Plugin v8.1. <http://www.monkeybreadsoftware.de/realbasic/plugins.shtml> [email protected]
