February 26, 2017, 10:23:26 PM

Author Topic: iOS build is very slow?  (Read 122 times)

jahndis

  • Newbie
  • *
  • Posts: 3
    • View Profile
iOS build is very slow?
« on: January 11, 2017, 02:05:34 AM »
I don't know if anyone else is seeing this, but I have a game that runs just fine on all of my android devices, runs fine on all desktop targets, but is slow as molasses on iOS. Here's some info:

My app is relatively simple. It preloads a set of 100 "shape" Entities with images created using Image.createGraphic(). (So I have 100 Image objects ranging from ~30x30 to ~300x300 depending on the size of the device). These shapes are kept in a pool that I use to spawn them. Each shape when spawned, is added to the room, and after a few seconds it is removed from the room and becomes available in the pool again.

Since everything is preloaded at the beginning, I wouldn't expect much memory growth. However, using the XCode(8) profiling tools, the total number of heap allocations balloons like crazy right at the beginning (1st couple of seconds) until it evens out at around 180MB. At this point the app is running noticeably slow.

Is there something I'm blatantly doing wrong? I've built this app for iOS with previous versions of HaxePunk and it works just fine (the version on the appstore works great still, just wanted to update it with some fixes I finally got around to doing). Is there an XCode option that I'm missing or did something change with the XCode update? Everything works on android just fine?

Other info:
Testing on an iphone 6+
my libs are at versions:
HaxePunk: [2.6.0]
hxcpp: [3.3.49]
lime: [2.9.1]
openfl: [3.6.1]
(I also tried with latest versions of each library with similar results. This is just what I happened to build the android versions with)

Thanks for any help or insight.

bendmorris

  • Global Moderator
  • Jr. Member
  • *****
  • Posts: 82
    • View Profile
Re: iOS build is very slow?
« Reply #1 on: January 15, 2017, 02:02:47 PM »
I'm not aware of any recent changes in HaxePunk that would specifically affect iOS. Are the OpenFL and Lime versions the same as before, or did you upgrade those as well? I would try using hxscout (http://hxscout.com) to see where the allocations in the beginning are coming from.

jahndis

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: iOS build is very slow?
« Reply #2 on: January 18, 2017, 12:16:38 PM »
I was originally attempting to update to the latest libs (required some code changes because of class restructuring if I remember correctly). So I'd rather I was using the latest libs. My results were slow both with the latest versions of lime and openfl as well as the versions I have listed.

I'll give hxscout a try (need to get it set up on my mac :P). I know that has helped find things on my main dev system before. Can you attach hxscout to an iOS process? The game runs fine in neko and mac targets so that wouldn't help much unless it can grab the iOS process.

To be honest, I'd be surprised if it's a HaxePunk/OpenFL/Lime issue. It seems more likely that the latest version of XCode might have some new things happening... Don't know if anyone else is building for iOS that could verify this?