Posted September 6, 200717 yr I had an idea to make a universal "ant-olly" routine for my delphi program.Basicaly what id does is:-get all processes runing-get all modules of each and every process-if module name gets recognized it trigers stuff in program.I am using lists to store all the data, and Pos(ModuleName[j], Strings) in a loop to check for known blacklisted modules.Is there a way to make the code faster?Execution on average system takes about 600ms(and CPU usage gets to 100% for that time)I want to reduce cpu consumption, and i knowasm code would most definetly do just thatbut my asm skils are almost equal to none.I'm gratefull for every help i get!Regards, ChupaChu! Edited September 6, 200717 yr by ChupaChu
September 6, 200717 yr When does your tool get stuck?When loading processes running?When loading modules of every process?When searching known names in all modules?Have you checked it is not entering in useless loops?If you want you could share your loading & searching routine, maybe it would be easier to detect where it is slow...CheersNacho_dj
September 6, 200717 yr Author There are no endless loops here.Its just that String operation take time.Lets say you have 50 running processesseach of them has at least 10 modulestaht makes 500 text strings.In basic there was MID and MID$, the secondwas faster doing string operations than just MIDbut i dont know if there is something like that inDelphi. I am mostly using Delphi POS command to find parts of string in another.There was in basic a command that would alowsystem events in order not to get temporeraly system lockups (cpu=100%) every few miliseconds.I dont know how to do that in Delphi, it might help a bit. Edited September 6, 200717 yr by ChupaChu
Create an account or sign in to comment