flat assembler
Message board for the users of flat assembler.
Index
> IDE Development > slow replace Goto page 1, 2 Next |
Author |
|
donkey7 11 May 2006, 18:26
why fasmw is so slow?
i've downloaded file http://ip-to-country.webhosting.info/downloads/ip-to-country.csv.zip and want to delete all quotation marks. using replace (" to nothing) it takes huge amount of time. couldn't it be optimized? _________________ Keep coding! |
|||
11 May 2006, 18:26 |
|
Tomasz Grysztar 11 May 2006, 20:10
Perhaps disabling "Undo" would make it faster. It's not much slower than Notepad and some other editors I tried anyway.
|
|||
11 May 2006, 20:10 |
|
Urff 13 May 2006, 11:54
donkey7 optimize the cofiguration of your PC only.... fasmw is faster than Notepad on my pc
|
|||
13 May 2006, 11:54 |
|
Madis731 15 May 2006, 11:03
Enough for my needs - I even use FASMW as Notepad replacement, because of the syntax highlighting - I can see where quotation marks and numbers are
Replacing <1MB files goes in a blink of an eye. |
|||
15 May 2006, 11:03 |
|
donkey7 15 May 2006, 12:02
btw: when reaching about 70% (about four minutes of replacing!) of file (link above) fasmw crashed. i have 512 mb of ram and win98se pl with unofficial service pack http://sp.up.pl/ . i think that undo stack limit is necessary
madis: i use metapad because it has line wrapping |
|||
15 May 2006, 12:02 |
|
Tomasz Grysztar 15 May 2006, 14:11
The problem may come from the fact that I don't have Win98, and so I was not testing fasmw on such system.
As for the Notepad replacement - recently I was quit suprised by the fact that one of my friends (who doesn't do any assembly programming at all) started to use FASMW everytime he needs to handle some huge SQL dumps - he told me it's the only editor he tried that allows him to edit 50 MB files without hanging or crashing every few operations. |
|||
15 May 2006, 14:11 |
|
donkey7 15 May 2006, 14:51
1. open huge file
2. replace all 'a' with 'b' 3. replace all 'b' with 'a' 4. repeat steps 2 and 3 million times fasmw should crash on all winshits btw: every other editor supports line wrapping. fasmw is like hiew - it can edit largest files without any problem. |
|||
15 May 2006, 14:51 |
|
Tomasz Grysztar 15 May 2006, 15:07
So perhaps crashing is because of running out of memory?
There a substantial difference between this editor model and hiew, as fasmw has (of course) an "insert mode". |
|||
15 May 2006, 15:07 |
|
vid 15 May 2006, 15:12
running out of memory is no excuse for crash!
|
|||
15 May 2006, 15:12 |
|
Tomasz Grysztar 15 May 2006, 16:17
Of course, there must be some leak in memory-allocation-error checking, if this is the reason. (Have you noted the EIP of crash?)
Though there still would be a problem if just Windows didn't have enough memory to display the message box with information that it run out of memory |
|||
15 May 2006, 16:17 |
|
donkey7 15 May 2006, 16:30
Code: FASMW spowodowaB bBd: nieprawidBowa strona w module FASMW.EXE przy 017f:0040ff99. Rejestry: EAX=ffffffff CS=017f EIP=0040ff99 EFLGS=00010286 EBX=00000000 SS=0187 ESP=0056f9d8 EBP=0056fcc0 ECX=00000001 DS=0187 ESI=00000000 FS=129f EDX=e0d41ac0 ES=0187 EDI=00000000 GS=0000 Bajtów w CS:EIP: ab eb 0e b9 40 00 00 00 f3 a5 83 8e 00 ff ff ff Stos: 00000001 2fc0ff08 0040e4d2 2fc0fe40 00ca0200 0056fcc0 0056fa04 0000056c 00029880 00000000 2fc0f900 0040fea4 0056faf8 00ca00c0 0056fcc0 0056fa28 position: 59992,2 or something i will crash it again and see if the results are the same btw: windows never has enough memory edit: of course it's newest fasmw.exe edit2: other position but same results. Last edited by donkey7 on 15 May 2006, 16:45; edited 1 time in total |
|||
15 May 2006, 16:30 |
|
Tomasz Grysztar 15 May 2006, 16:45
I see, this is actually a bug in the routine that handles the "not enough memory" error (it tries to reverse the changes that it was not able to finish, but there's a problem that causes the crash in case when it run out of memory while it trying to store state information for undo).
|
|||
15 May 2006, 16:45 |
|
vid 15 May 2006, 16:45
Tomasz Grysztar wrote: Though there still would be a problem if just Windows didn't have enough memory to display the message box with information that it run out of memory but it still shouldn't crash btw, it is wise to first free all allocated memory and then display errors btw, this is quiet nicely solved in FASMLIB |
|||
15 May 2006, 16:45 |
|
Tomasz Grysztar 15 May 2006, 17:38
vid wrote: but it still shouldn't crash Well this is already not under my jurisdiction. |
|||
15 May 2006, 17:38 |
|
vid 15 May 2006, 18:15
i think it returns in such case... we could try.
|
|||
15 May 2006, 18:15 |
|
Tomasz Grysztar 15 May 2006, 18:29
I think I fixed it in 0.93.5. I also added an option to disable undo buffer, so that you can try making such replaces without wasting a memory for undo. It doesn't appear to gain more speed using this feature, though - the bottleneck lies somewhere else (perhaps in the insertion overhead).
To everyone: please let me know if you find this option useful. vid: But I did mean that the problem would be if the Windows crashed. |
|||
15 May 2006, 18:29 |
|
okasvi 15 May 2006, 21:14
offtopic: something related to out of memory, I found out that if i try to compile any source, and inside a proc(didnt test otherwise) i have 'locals' without ending 'endl' i always get out of memory error... i had ends instead and was wondering what is the cause for quite some time
|
|||
15 May 2006, 21:14 |
|
donkey7 16 May 2006, 11:00
tomasz:
what about noupdate flag (when prompting is disabled)? it will prevent from updating sliders and statusbar after each replace. maybe this will speed things up? btw: undo should work in slightly another way. when i use it it should undo all relpaces at once - one undo for one operation. so when i replaced all 'a' with 'b' and clicked undo, it should recover entire text. another tip: make an option in replace dialog - selection only. it should then search for patterns to replace only in selected text. |
|||
16 May 2006, 11:00 |
|
Tomasz Grysztar 16 May 2006, 11:19
The "search in selection" was something I always wanted to have here (since I had it in DN's editor on which this one is based), however never found enough time for it, as it's a bit complicated task with this design.
As for undo-ing all replacements at once, there already is a special flag for this implemented, FASMW just forgot to use it. As for "noupdate" I will try whether it gives any speedup. Is the "disable undo" of any use, or I should get rid of it? |
|||
16 May 2006, 11:19 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.