Modern Word.

ZXNet echo conference «code.zx»

From Aleksey Malov To All 11 June 2000

Greetings, All! Maybe someone can contact Demiurg Ash about the subject. Yes a proposal without unnecessary hemorrhoids to speed up the formatting process by an order of magnitude text, otherwise I forgot to wait half an hour until the subject is 16 kilobyte text will format. The idea is this: The current version of the subject will constantly expand (or shift) the text in buffer during formatting. As a result, the speed drops catastrophically. I propose the following method (in my opinion, the authors could have guessed it themselves): There is text. The block to be formatted is marked inside it. As a result the text seems to be divided into 3 parts - the text before the selected block, the block itself, text after the selected block. The presence of text before and after a block is not mandatory. As a result, a hole is formed inside the text buffer. source_adr=new address of the beginning of the block (the address next to the address of the last byte hole). destination=hole start address. The process of formatting led to part of the text from the beginning of the block to the last bytes of text is thrown to the end of the text buffer. Next, the formatting process begins: A string is taken from source_adr, formatted and placed in destination. The end the line that needs to be moved to another line is added to the beginning next line from source_adr. I think the principle is clear. According to my calculations, the formatting speed will not beless than 30k per second. There is an optimization hundreds of times. I wish you health, happiness and creative Uzbeks. Aleksey Malov aka VIVID/Brainwave.