Re: Lost memory, GCD, dispatch sources, ?Cocoa bindings & User interface
Re: Lost memory, GCD, dispatch sources, ?Cocoa bindings & User interface
- Subject: Re: Lost memory, GCD, dispatch sources, ?Cocoa bindings & User interface
- From: Jean Suisse <email@hidden>
- Date: Thu, 17 Sep 2015 20:43:25 +0200
From what you write, that’s already what I do.
> Just as I thought. You're overloading the system by tightly coupling your model and your view. Let your instruments (models) do their work, and let your controller consult them when ready and update the view; don't use your controller to tell the models to update the views.
That’s the job of the data collecting threads. I have one timer dispatch source per communication interface that tells the instruments objects to gather data from the physical instruments. This runs every second or so. It’s hard to tell because communication can be over wired lines or wireless.
Then I have one timer dispatch source that collects data gathered from the instrument objects, process them and put them in their respective data files. This timer fires exactly once every second.
One one timer dispatch source deals with synchronization issue. It fires exactly once every second, returns ASAP.
On UI update dispatch source that should ideally collects data gathered from the instrument objects and display them. And there is a slight shade of gray. Instead of having an other object owning the properties bound to the UI and doing displayObject.boundProperty = instrument.valueProperty, the properties bound to the UI are members of the instrument object. So what happens is I do instrument.boundProperty = instrument.valueProperty.
Finalizing the decoupling would not solve the memory display issue, since it’s a bug in appkit itself. It would just make things a little bit cleaner.
_______________________________________________
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
References: | |
| >Lost memory, GCD, dispatch sources, Cocoa bindings & User interface (From: Jean Suisse <email@hidden>) |
| >Re: Lost memory, GCD, dispatch sources, Cocoa bindings & User interface (From: Quincey Morris <email@hidden>) |
| >Re: Lost memory, GCD, dispatch sources, Cocoa bindings & User interface (From: Charles Srstka <email@hidden>) |
| >Re: Lost memory, GCD, dispatch sources, Cocoa bindings & User interface (From: Ken Thomases <email@hidden>) |
| >Re: Lost memory, GCD, dispatch sources, ?Cocoa bindings & User interface (From: Quincey Morris <email@hidden>) |
| >Re: Lost memory, GCD, dispatch sources, ?Cocoa bindings & User interface (From: Jean Suisse <email@hidden>) |
| >Re: Lost memory, GCD, dispatch sources, ?Cocoa bindings & User interface (From: Quincey Morris <email@hidden>) |
| >Re: Lost memory, GCD, dispatch sources, ?Cocoa bindings & User interface (From: Jean Suisse <email@hidden>) |
| >Re: Lost memory, GCD, dispatch sources, ?Cocoa bindings & User interface (From: "Gary L. Wade" <email@hidden>) |
| >Re: Lost memory, GCD, dispatch sources, ?Cocoa bindings & User interface (From: "Gary L. Wade" <email@hidden>) |
| >Re: Lost memory, GCD, dispatch sources, ?Cocoa bindings & User interface (From: Jean Suisse <email@hidden>) |
| >Re: Lost memory, GCD, dispatch sources, ?Cocoa bindings & User interface (From: "Gary L. Wade" <email@hidden>) |