-2

why arc enabled application is running slow.I have done changes in all my application source files both .h and .m file. But the application is launching very slowly.

I have given -O0 value for the Debug option in optimization and -os for release.But my application is still not running well.Please tell me how can i launch the application fastly.

jscs
  • 62,161
  • 12
  • 145
  • 186
  • you application would be slow basically, the type of the memory management (`ARC` or `MRC`) does not affect your application's speed. – holex Aug 22 '12 at 16:00
  • No my application without ARC is running fast.Only application launch is taking time.I have tested the application with MRC only it is running fast.when i run the application using only ARC it is not launching the application.If i run the MRC application first and launch the ARC application later then both the applications are launching properly.If i dont launch the MRC applicaiton first it is not launching the ARC application. – user1617481 Aug 22 '12 at 16:09
  • I'm sure @H2CO3 has valuable advice. **H2, can you hear me?** – Nikolai Ruhe Aug 22 '12 at 16:18
  • the is `ARC` is **not** a runtime feature (it is not a `GC` or same), therefore the `ARC` does not affect your application's runtime speed. the problem would be somewhere else but we don't know anything about the init process i.e. what you are loading at the start. – holex Aug 22 '12 at 16:22
  • holex, that's not true. retain and release execute at runtime, and are slower than you might expect. If ARC inserts different calls to retain and release (and it will!) then your program will take more or less time to execute. I've seen this happen in many different programs; in most cases, the difference is small, but in a few it can be quite large. Please think before posting something like this. – Catfish_Man Sep 08 '12 at 20:12

1 Answers1

1

0) You need to profile your app to determine where it is spending its time, and to find what does not match your expectations. Instruments.app is awesome at helping you with this -- Learn to use it.

1) If this is a quick "I just converted my project to ARC, and now it is much slower with no other changes.", then you should begin with point#0 (above). …but you may also be interested in reading about the performance and semantic differences in ARC and MRC programs. "Switching on" ARC is certainly capable of introducing overhead. How that affects your program… well, you would have to measure and understand a good amount of how it works. MRC alone isn't a formula for a fast program -- you would need to understand a whole lot more.

Community
  • 1
  • 1
justin
  • 101,751
  • 13
  • 172
  • 222