projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d35f7ea
)
Further marginal speed hacking: in MemoryContextReset, don't call
author
Tom Lane
<
[email protected]
>
Sat, 14 May 2005 23:16:29 +0000
(23:16 +0000)
committer
Tom Lane
<
[email protected]
>
Sat, 14 May 2005 23:16:29 +0000
(23:16 +0000)
MemoryContextResetChildren unless necessary.
src/backend/utils/mmgr/mcxt.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/utils/mmgr/mcxt.c
b/src/backend/utils/mmgr/mcxt.c
index 925fdb9868bcd37e8434a58cdf04655050f3ba61..bcc397799a23c1feb7cc9f5450b46d86209b5123 100644
(file)
--- a/
src/backend/utils/mmgr/mcxt.c
+++ b/
src/backend/utils/mmgr/mcxt.c
@@
-123,7
+123,10
@@
MemoryContextReset(MemoryContext context)
{
AssertArg(MemoryContextIsValid(context));
- MemoryContextResetChildren(context);
+ /* save a function call in common case where there are no children */
+ if (context->firstchild != NULL)
+ MemoryContextResetChildren(context);
+
(*context->methods->reset) (context);
}