The O.G. Virtual learning! Buy one, get 2 more Lifetime Memberships! - Click Here!

Page load delay

This topic contains 5 replies, has 3 voices, and was last updated by  Mark 4 years, 10 months ago.

  • October 3, 2016 at 3:47 am #156561

    I have an issue with 2 of the pages in the storybook I am developing. After, pressing to go to the next page there is a far longer delay than the others but all the settings in the plist are the same. What makes the problem worse is that each page has narration that starts when the page loads, so in these 2 instances you are hearing narration before you see the page.

    I have been pulling my hair out wondering what might be causing the delay. Any help appreciated.

  • October 3, 2016 at 11:52 am #156577

    Does the page contain any particularly large images?

  • October 4, 2016 at 2:05 am #156591

    Thank you for replying. One of the pages contains 1 meg png file but the other does not. I’ve tried removing all assets from the screen but the problem persists. Narration backgrounds files are all under 100k.

    It’s a very simple page turner: cover -> menu (huge delay) -> page 1 (slight delay) –> page 2 (no delay) –> page 3 (no delay) –> page 4 (noticeable delay, and motion stutter) –> etc.

    By the time the menu page loads it’s 4 sec narration has already played.

    Other than slight move actions there isn’t much else happening on these pages.

  • October 4, 2016 at 2:03 pm #156621

    I did a quick test with a large png (12mb) and had no problems. Is the delay in the simulator or device? The simulator is not the best place to test your code as it isn’t as smooth in the transitions. What version of Xcode/Swift?

    Here’s what I would try:
    1. A quick test would be to replace the current png with just a color Sprite.

    2. Place a “print” statement in the Plist after OpenPage and place a “print” statement in the OpenPage code. This will let you know if it has loaded and not displayed. If there is a delay in the “print” statement between the first print statement and the second, then its before the OpenPage execution. Then try #3 below.

    3. Have Cover go to Page 1 (bypass the menu). This would check if the menu loading is the issue.) If it works, then its in the menu transition.

    4. If in the menu transition, disable any actions (I put a “_” after an action (including narration) so it doesn’t get called – though you’ll get an error that it can’t find it but that is expected.) If that works, start adding each action one at a time until you find the source of the delay. If that doesn’t fix it I would start a new page (copy from a good page file) to replace the menu, then copy and paste the settings to build a new menu file.

    Hope this helps!


  • October 5, 2016 at 3:37 am #156640

    Thank you for helping me think through it clearly again. I rebuilt the page and found the culprit. Because there is some bug that doesn’t allow me to access the complete range of system fonts, I installed a custom font, and it’s loading was the reason for the delay.

    Thanks again.

  • October 5, 2016 at 1:46 pm #156671

    Awesome! I’ll have to keep in mind the font bug!

You must be logged in to reply to this topic.

Know what an affiliate program is? You make money just by sharing links to our site! Win. Win.

Earn when you refer any buyer here! 30 day tracking. Commissions are 33%-50% and recur on subscription products!

Uh oh, missing your affiliate ID. Create one real quick