V4CC - garbage collection question

Dave Parizek dave at janesoftware.com
Wed Sep 20 13:00:41 CDT 2006


Thanks for the info!  Some of it was over my head, but I have mostly  
already spent a lot of time learning Cocoa memory management, so I  
guess I will just keep at it.  It will be better for my development  
(as a programmer) in the long run on top of not being good for this  
application (as you pointed out).

What you are saying makes sense.  But then it makes me wonder about  
RealBasic and Valentina.  RealBasic uses GC, but I do not see  
performance problems (that I recognize) when I use V4RB with RB and  
Einhugur's DataGrid - it seems unbelievably fast.  It does many  
things way way faster (based on casual inspection) than Cocoa apps  
like CocoaMySQL or iSale (core data?).   This is sort of apples and  
oranges, instead of apples and apples, but just curious...

  Is that because things overall are handled differently with RB's  
garbage collection, or with Valentina's object creation/destruction  
in RB, or just that I do not have a clue what real performance could be?

What does NOP mean?

--Dave



On Sep 20, 2006, at 12:27 PM, Shaun Wexler wrote:

[...]

>
>> [...snip]   do a version of the Valentina V4CC frameworks that  
>> uses garbage collection?  Or will we need to wait until Leopard is  
>> out to the public to be able to play with this?
>
> I can suggest quite honestly that you really don't want to have  
> this.  Having several thousand or even millions of referenced  
> objects in the auto zone would cause a complete stall of your app  
> each time the entirety of your strong pointers were scanned by  
> GC... it's not a pretty picture.  It might be inevitable for V4CC,  
> though GC in general is not recommended for high-performance  
> applications.
>
> FYI, Valentina'c C++ objects (although not the V4CC wrappers  
> themselves) use inline refcounts.  Any objects which use a custom  
> zone allocator can work within a GC-enabled system, but proper  
> refcounting semantics must still be applied.  Even with GC, you can  
> implement refcounting, but it's a NOP underneath if they're  
> collectible.
> -- 
> Shaun Wexler
> MacFOH
> http://www.macfoh.com
>



More information about the Valentina-beta mailing list