realbasic-plugins
[Top] [All Lists]

Re: Speeding up REALlock and REALunlock even more?

To: realbasic-plugins at lists dot realsoftware dot com
Subject: Re: Speeding up REALlock and REALunlock even more?
From: "Theodore H. Smith" <delete at elfdata dot com>
Date: Wed, 26 Oct 2005 18:16:17 +0100
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <20051026170055 dot 30B76E46D27 at lists dot realsoftware dot com>
From: Chris Little <cslittle at mac dot com>
Date: Tue, 25 Oct 2005 13:44:57 -0400

on 10/25/05 1:29 PM, Thomas Tempelmann at listuser at tempel dot org wrote:


Theodore H. Smith wrote:


I don't see why I'd need to make any special considerations for
exceptions.


Please do this at least: _Verify_ that it's not a problem by
making a test in which you lock objects once your way and once
the "old" way, and text if both times local objects get
destructed properly, both in a normal case ("return" from the
function and when the're an exception in it).



In every version of RB that you plan to support. There is no guarantee that how locking and exceptions work doesn't change by RB version, release vs
debug, platform, ...

That's what my Unit Tests are for Chris ;o)

Every part of my plugin is extensively tested. I almost never find a user finding a bug before I do. In fact I almost never get users finding bugs full stop. I can't remember the last bug a user has found in my ElfData plugin.

So yes, if I was to use my own locking inline, I would do some extensive tests on this, including exceptions and anything else I could think of, all of that would be put into my unit test project, and so that way I could rest reassured by my unit test that things are working on the version of RB and platform I've tested.

The root question for this whole discussion is, does changing how you
lock/unlock objects actually make a measurable in an application. This all
seems like a case of premature optimization to me.

:P

Not when you have a big bunch of variables on the stack to save and restore. RB can't do anything about that, stuffing and restoring variables from the stack is a part of life (at least when it comes to calling functions).

It might seem premature to you, but if I think it's a good thing to do, it usually is a good thing to do, even if only for me to learn that it wasn't worth it after all, lol.

--
http://elfdata.com/plugin/

What does our work achieve, if it's not making the world a happier place?
http://www.whatnextjournal.co.uk/Pages/Next/Happiness.html
When's the last time you thought deeply about how to improve our lives?


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>