how to avoid script's "slow downs"

Discuss any general programming issues here

how to avoid script's "slow downs"

Postby peceha » Wed May 31, 2017 12:10 pm


it has something to do with memory in use. I just noticed that whenever (Hollywood or AMIGA OS3.1) frees some memory the program execution slows down (from average 8 seconds to 12 or even 20 seconds sometimes).
At first I was looking for some mistakes in my script but then I noticed memory amount on the workbench's menu and I'm almost 100% sure that must be the problem.

The program is just an infinite loop (for testing), after every loop it prints out the time how long the calculations took time.
EVERY first run is always the fastest (~8seconds), each other is much slower (~13 seconds or even more, sometime less).
When the program starts I can see that free memory is going down - the loop is finished and the execution time is fine. When the program runs another loop I can see that free memory is going down again but sometimes it stops (not changing) and thet it jumps up (shows more free memory that before) - when that happens my program slows down.

How to avoid this? Or How can I force to free memory when the program is iddle - I tried Garbage collector but no luck.

Posts: 35
Joined: Tue Dec 13, 2016 9:39 am
Location: Poland

Re: how to avoid script's "slow downs"

Postby airsoftsoftwair » Thu Jun 01, 2017 11:49 pm

Hard to tell, can you post a minimal example script that shows the problem?
User avatar
Posts: 2025
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Return to General programming

Who is online

Users browsing this forum: No registered users and 3 guests