ID:260952
 
Does the time reported by the world profile include time spent on garbage collection?

I'm seeing some profiler times that look strangely high. The only thing I can figure is that list operations are slow or they are causing the garbage collector to run a lot, but I'm not sure if the GC time is counted there.
Forum_account wrote:
Does the time reported by the world profile include time spent on garbage collection?

If the operation involved triggers some objects to fall out of scope and get collected, then yes, it should. Not all garbage collection will be caught during procs though, as it is possible for an object to fall out of scope in other ways.

I'm seeing some profiler times that look strangely high. The only thing I can figure is that list operations are slow or they are causing the garbage collector to run a lot, but I'm not sure if the GC time is counted there.

Hard to say without knowing more about the routines involved. Technically what would be happening wouldn't be so much the garbage collector running as just regular deallocation; full garbage collection would be a much bigger deal. Depending on what's deallocated though, it could have an impact on many things causing many deallocations to trigger.
In response to Lummox JR
I don't have the numbers handy but it seems like calling a proc that returns a list extends the parent proc's execution time by more than the child's running time - my guess was because it returns a list which goes out of scope when the parent ends and has to be cleaned up.

I'll have to look into it more. There were just some procs taking longer than expected and I was curious about what could potentially be taking the extra time.
In response to Forum_account
Forum_account wrote:
I don't have the numbers handy but it seems like calling a proc that returns a list extends the parent proc's execution time by more than the child's running time - my guess was because it returns a list which goes out of scope when the parent ends and has to be cleaned up.

That's a plausible guess, though the time to recover a list should be fairly inconsequential unless it has a lot of objects in it that also fall out of scope (or, it's very very long). Deleting a list will DecRefCount anything in its contents and calling that routine even for numbers and nulls will have some small impact, though realistically not very much. If the routine is called very frequently and/or the lists are big though, those calls could add up even if they are minor.
In response to Lummox JR
In this case the lists are short (less than 30 items) and they contain references to objects, but they wouldn't be the last remaining references.

I'm dealing with simple procs that are called frequently. I think I just need to do some more profiling to put things in perspective. At a glance its hard to tell if 10 microseconds per call is a lot or a little.