Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc8a6b52

Browse files
committed
Further marginal speed hacking: in MemoryContextReset, don't call
MemoryContextResetChildren unless necessary.
1 parentfabef30 commitc8a6b52

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎src/backend/utils/mmgr/mcxt.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
*
1616
* IDENTIFICATION
17-
* $PostgreSQL: pgsql/src/backend/utils/mmgr/mcxt.c,v 1.54 2005/02/18 21:52:33 tgl Exp $
17+
* $PostgreSQL: pgsql/src/backend/utils/mmgr/mcxt.c,v 1.55 2005/05/14 23:16:29 tgl Exp $
1818
*
1919
*-------------------------------------------------------------------------
2020
*/
@@ -123,7 +123,10 @@ MemoryContextReset(MemoryContext context)
123123
{
124124
AssertArg(MemoryContextIsValid(context));
125125

126-
MemoryContextResetChildren(context);
126+
/* save a function call in common case where there are no children */
127+
if (context->firstchild!=NULL)
128+
MemoryContextResetChildren(context);
129+
127130
(*context->methods->reset) (context);
128131
}
129132

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp