Re: Cocoa and Computational Expense
Re: Cocoa and Computational Expense
- Subject: Re: Cocoa and Computational Expense
- From: syntonica <email@hidden>
- Date: Sun, 21 Jun 2009 15:08:56 -0700 (PDT)
Thanks All for your replies. I think I have seen the error of my ways regarding the size of my class. Since I had two classes that were so hopelessly intertwined, I put them together into one and now I see that I could indeed have done it instead with two or maybe three. The paradigm shift from all data available at all times with all the globals you can eat to private data has been a difficult one to make for me.
Regarding my final program, I tried to use Shark, but I believe I need a little more experience and to take a look under the hood before it starts making sense to me. So, I tried the same informal test with Text Edit and got similar results, about 25% of my processor was used (where my program used 30%.) Text Wrangler used about 50%. This leads me to three conclusions:
0. My code doesn't totally stink.
1. The Field Editor is very expensive to use.
2. 1GHz of G4 just doesn't go as far as it used to.
However, the learning experience has been a positive one and I really enjoy working with Cocoa, even if the majority of Apple's documentation leaves me scratching my head. I usually need to see concrete examples to understand how the code works.
I doubt I will go back and fix my program to split the classes up. This is like Mark VII on this program, the previous six dismantled and reincorporated--I kept coding myself into a corner where only a global would save me and I am just happy the accursed thing works. So, I will know that much more about what I am doing with my next project. I think it will be with graphics. OpenGL looks interesting. :)
Once again, thanks to all who took the time to read and reply.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden