Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Is There A Way To Make Faster String Operation In Delphi?

Featured Replies

Posted

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 know

asm code would most definetly do just that

but my asm skils are almost equal to none.

I'm gratefull for every help i get!

Regards, ChupaChu!

Edited by ChupaChu

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...

Cheers

Nacho_dj

  • Author

There are no endless loops here.

Its just that String operation take time.

Lets say you have 50 running processess

each of them has at least 10 modules

taht makes 500 text strings.

In basic there was MID and MID$, the second

was faster doing string operations than just MID

but i dont know if there is something like that in

Delphi.

I am mostly using Delphi POS command to find parts of string in another.

There was in basic a command that would alow

system 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 by ChupaChu

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.