git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fabef30)
Further marginal speed hacking: in MemoryContextReset, don't call
2005年5月14日 23:16:29 +0000 (23:16 +0000)
2005年5月14日 23:16:29 +0000 (23:16 +0000)
MemoryContextResetChildren unless necessary.


diff --git a/src/backend/utils/mmgr/mcxt.c b/src/backend/utils/mmgr/mcxt.c
index c5a2311bc5e53395dbef371607b87f06ee1db0f1..6d68e30f7eb330a35047d2375c2836d6f0be0a96 100644 (file)
--- a/src/backend/utils/mmgr/mcxt.c
+++ b/src/backend/utils/mmgr/mcxt.c
@@ -14,7 +14,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/mmgr/mcxt.c,v 1.54 2005年02月18日 21:52:33 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/mmgr/mcxt.c,v 1.55 2005年05月14日 23:16:29 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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);
}
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /