|
From: Roger H. <rog...@mi...> - 2005-01-28 12:48:10
|
On Thursday, January 27, 2005, at 04:10 pm, Joseph J. Strout wrote: > > That is surprising. This may be a silly question, but are you sure > Sampler is showing you the time spent only in the parent function, and > not the time spent in the parent function or any of its children > (functions it calls)? Yes, you have to check the box 'Invert call tree' , then the left hand column displays just the time in a each function. We call Q3Object_Is_Type from nearly every Q3 routine and some of the E3 routines too. > >> I think in the release version we are checking out inputs too often, >> for instance in E3Shared_Acquire we check the parameter is of type >> shared. We then call Q3Shared_GetReference which again checks its >> parameter is of type shared. >> It also calls E3System_Bottleneck even though we must have come into >> E3Shared_Acquire from a Q3 routine which will have already called >> E3System_Bottleneck. > > That's a good point. I would think that once we're in a E3 routine, > we should be safe to directly call another E3 routine rather than > going through the Q3 version. As a general principle, we may trust > ourselves, even if we don't trust the user. Good. I'm not going to do a wholesale change, but when I find a time critical area I will apply that principal. As for not trusting the user, in a debugging environment I agree wholeheartedly, in production if we detect an error then most of the time an application will merely fail in another way. I use Quesa through C++ wrappers so that I would actually have to go out of my way to call Quesa with an object parameter which was not actually an object. Maybe I could compile a special version of Quesa where Q3Require etc are defined to be nothing, just like Q3Debug is in the release version. Roger. |