discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

libobjc2 & arc & multithreading


From: Andreas Fink
Subject: libobjc2 & arc & multithreading
Date: Mon, 27 Nov 2017 07:56:59 +0100

Hello all,

I have a heavily multithreaded application which runs under MacOS X and Linux. Under linux we use gnustep-base and libobjc2 (its a server app with no GUI). The application is completely written with automatic reference counting (ARC). Under heavy load under Linux we now noticed that we are very often sitting in locks triggered by ARC releasing objects in memory it doesn't need anymore. Usually my code is at a }  and libobjc2 waits on some global lock on freeing objects while other threads sit on a init or alloc call or also on a ARC release.

There is nothing generally wrong with this but the performance is impacted. 99% of the objects which get released with ARC that way are being created in the same thread which means no lock would be needed. Only when an object was created or held by another thread, things should be done more carefully. I believe this could speed things up a lot.

There is obviously a few things in libobjc2 which need better maintenance.
For example we always have to remove a debug log output related to a dtrace release which otherwise would spam our stdout as its being constantly called.

Is there anyone on this list who would like to join our efforts in this area or has some feedback on this subject? We have not touched libobjc2 code part until now but its essentially our performance bottleneck now.


Andreas Fink
------------------------------------------------------------------
Fink Telecom Services, Paradieshofstrasse 101, 4054 Basel, Switzerland
Mobile: +41-78-6677333
Skype: andreasfink    Jabber/XMPP: address@hidden ICQ: 8239353
------------------------------------------------------------------






reply via email to

[Prev in Thread] Current Thread [Next in Thread]