Jump to content

We have updated TG007.net. If you notice any problems please let us know.

Sophist

Members
  • Content Count

    1
  • Joined

  • Last visited

  • Days Won

    1

Sophist last won the day on September 17 2018

Sophist had the most liked content!

About Sophist

  • Rank
    One Timer

Profile Information

  • Country
    United Kingdom
  1. Sophist

    Whilefix For Mirc V7+

    I know this is a little late (LOL - several years late) but the solution does NOT require any DLLs. Suppose you have a loop that iterates 1 million times. You update the code to loop (say) 1,000 times, and when that has completed queue the same loop again on a ".timer 1 0" to run the next 1,000 iterations. What this does is give up control to allow mIRC to process other things every time you queue the next 1,000 iterations on the timer. You should aim IMO for each chunk to take c. 100ms to run - any longer and mIRC will feel laggy, and significantly shorter starts to create significant overhead - and you can even measure how long it took for e.g. the first 1,000 iterations and then adjust the number of iterations for further chunks to be closer to the 100ms target. I have something like this working nicely on a script I am currently writing which loads a large database from a flat file into hash tables in this asynchronous way. (Plus once the data is loaded, it uses hsave to create a cache so that next time it can use hload to populate the hash table which is c. 7x faster - and it uses a similar technique to save and load hashtables asynchronously. Finally if you try to use the data when it is still loading asynchronously, then it switches the chunk size to a huge number and loads the rest of the data synchronously so it can use it and return data to the calling script.) All of this is achieved using standard mSL without any DLLs.
×