Max loops per frame and processing speed

What is the maximun number of loops you can run per frame? I know you can run 60 frames per second when doing loops but what is the maximum number of loops per frame that you input in the "max loops/frame" prompt? And will it actually run at that? Trying to improve the speed that I look through a fairly large table. At present the loop table behaviour is freezing my game for about 20-30 seconds to look through about 270000 cells. I cant do anything until it finishes (as in it wont allow me to do anything else until that is done). Any ideas?

Comments

  • zweg25zweg25 Member Posts: 738

    You have to optimize the loop time. Gamesalad doesn't run loops like other programs if you ever learned big O notation and such. So you have to work to cut the loops to I'd say under 1,000

  • HopscotchHopscotch Member, PRO Posts: 2,782
    edited December 2016

    @fmakawa

    the ideal "max loops/frame" (MLF) is totally dependent on what your loop and the rest of your app does at the time.

    As you noticed, if your MLF is set too high, your app will freeze until the number of cycles is done. If set too low, the app stays responsive, but the loop obviously takes longer to finish. You need to find the sweet spot through testing.

    Do you make use of the tableSearch function?

    In my experience, with the right table structure and tableSearch/Loop combination you can continuously search over one million cells per second while maintaining 30 FPS.

    GoGS (tm)

    Attached is a quick project that searches for multiple occurrences of a value, in a table of 1 million rows, in ca. half a second.

  • fmakawafmakawa Member Posts: 565

    Thanks, Tweaked mine a bit and its working beautifully

Sign In or Register to comment.