Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

rogelio75

macrumors newbie
Original poster
Jun 14, 2017
1
0
I have an app with over 200 UIView Controllers and it runs really slow, why?


I have the Mac Pro Cylinder:

3.5GHz 6-Core Intel Xeon E5

16GB 1866Mhz DDR3 ECC memory

GDDR5 VRAM each

512 PCIe-based flash storage

AMD FirePro D700



All help is appreciated,



Thank you!
 
What part runs slow? Xcode or the app on a device?

If it's the app on a device you should start with Instruments and profile the application.

If it's Xcode then having a storyboard with 200 view controllers is a lot. I would consider breaking it down into separate storyboards with maybe 20 or 30 scenes in each. Reducing the number of scenes per storyboard might improve the speed of the app on the device also.
 
Are you writing about the simulators or a real device. They run a little different and yes 200 uiviewcontrollers says you are missing something in your programming.

Think of a uiviewcontroller as an app within an app and if you need more uiviews then add them as needed via sub views. But in reality even an OSX program or app doesn't need that many views normally.
 
Be specific.

If Xcode: Is it compile times, interacting with the editor, xib or storyboard files, the visual debugger? Define what you think is slow.

If your app runs slow, that is likely some poor setup or design issue. You'll have to be very descriptive to gain any insight from a forum like this. It may be best to higher a very experienced iOS developer for a few days of consulting.
 
I have discovered that if you are editing a source file in Xcode, you should NOT simultaneously be editing or even looking at a Storyboard/xib file. If you try to have both open at the same time, the Swift autocorrect crashes all the damn time. It's unbelievably annoying.
 
I have an app with over 200 UIView Controllers and it runs really slow, why?


I have the Mac Pro Cylinder:

3.5GHz 6-Core Intel Xeon E5

16GB 1866Mhz DDR3 ECC memory

GDDR5 VRAM each

512 PCIe-based flash storage

AMD FirePro D700



All help is appreciated,



Thank you!
Just out of curiosity, what in the world do you need 200 VCs for??? The most complex and advanced iOS apps don't even come close to that number...
 
Since the OP hasn't returned, I think responding further to them is wasted effort.

The argument that 200 VCs is somehow bad doesn't take onto account a complicated app or the fact that VCs can be used for more than just full screens. For instance the app I'm currently working on has many view controllers that are used for sections within a screens and as complicated table view cells. The total VC count is well over 100 and we don't have performance issues.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.