[haiku-development] Re: session manager

On 19.08.2011 10:36, Axel Dörfler wrote:
Ingo Weinhold<ingo_weinhold@xxxxxx>  wrote:
Clemens wrote:
In case of tracker thats a bit different. IMHO the problem here is that
tracker is a single process but there should be one BApplication for each
window. Just another reason for that: tracker add-ons can crash the
complete tracker session, that is bad.
There are also cons for such a design. Multi-launch would make coordination
of what directories have been opened significantly more complicated. It
would also waste resources and make currently Tracker-wide caches (like the
icon cache and probably also node monitoring) work far less efficiently.
People more familiar with Tracker might come up with more issues.

Not necessarily more problems (aside from settings being loaded again for each 
new process), but all this could certainly be solved with proper use of shared 
memory. However, there is absolutely no point in doing so: putting Tracker 
windows in separate processes would just be a huge waste of resources (also 
developer resources) without any gain -- opening a window in Tracker would just 
use up more resources and would be slower (due to dynamic binding the 
executable). Future Tracker versions which might use add-ons for their views 
would take an even higher penalty.

If the runtime loader and or kernel would be smarter, it could map the same physical pages to multiple instances of the same process. Recent versions of Linux do such a thing, mostly to make it more efficient to run multiple virtual machines that have mostly the same memory contents. Sand-boxing is employed more and more for security reasons, it seems to be the direction in which things are evolving. If it reduces the annoyance when something crashes along the way... all the better. The VM architecture and features can certainly make this approach come with less of an impact on resources.

Putting the current add-ons in a separate process is a whole different thing, 
though, and certainly a good idea, as they don't need access to any Tracker 
internals and vice versa.

But eventually add-ons will/should be used for more stuff, like implementing whole new view modes for directories.

Best regards,

Other related posts: