hartlco/MHCustomTabBarController

Slow performance

superandrew opened this issue · 6 comments

When I press a tab, the first time a view gets loaded, it takes some time. Any Idea on why that could happen?

Thank you very much!

any news on this?

thanks!

Hi!

The ViewControllers for MHCustomTabBarController are lazy loaded. This means, the first time the tab is pressed, the ViewController gets loaded (viewDidLoad is called), after that the ViewController is kept in the memory. To improve the performance you need to optimise the ViewController code, load resources in a background thread etc.

Let me know if you need more information!

Martin

I've read your words, and understand their meaning, but I am far to understand how to implement this logic. You mean I need to subclass MHCustomTabBarController? And in a background thread load my viewcontrollers?

Is this something related to the design of MHCTB or something on a OS level?

Thanks!

hi @mhaddl could you please suggest how and where to implemetn this in MHCustomTabBarController? should I subclass it? which methods should I look into?

thanks

Hello, My problem was totally urelated to MHCustomTabBarController. In facts, it was a font no more used in the app and referenced in the storyboard that created a lazy loading very slow for the lookup of the font. I checked it with time profiler.

Hope it helps!

On 04 Oct 2015, at 13:03, Martin Hartl notifications@github.com wrote:

Hi!

The ViewControllers for MHCustomTabBarController are lazy loaded. This means, the first time the tab is pressed, the ViewController gets loaded (viewDidLoad is called), after that the ViewController is kept in the memory. To improve the performance you need to optimise the ViewController code, load resources in a background thread etc.

Let me know if you need more information!

Martin


Reply to this email directly or view it on GitHub #21 (comment).

Great you found the problem!

Cheers