mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Performance improvement: Avoid using sqlite3WalkerSelectExpr()
and sqlite3WalkerSelectFrom() twice, so that the compiler will in-line their implementation. FossilOrigin-Name: 2b9258b8b0342330ebe8c22b59ec276fd042a05547d15b24fdf29e16280868de
This commit is contained in:
@@ -1345,13 +1345,16 @@ static int gatherSelectWindowsCallback(Walker *pWalker, Expr *pExpr){
|
||||
}
|
||||
return WRC_Continue;
|
||||
}
|
||||
static int gatherSelectWindowsSelectCallback(Walker *pWalker, Select *p){
|
||||
return p==pWalker->u.pSelect ? WRC_Continue : WRC_Prune;
|
||||
}
|
||||
static void gatherSelectWindows(Select *p){
|
||||
Walker w;
|
||||
w.xExprCallback = gatherSelectWindowsCallback;
|
||||
w.xSelectCallback = 0;
|
||||
w.xSelectCallback = gatherSelectWindowsSelectCallback;
|
||||
w.xSelectCallback2 = 0;
|
||||
w.u.pSelect = p;
|
||||
sqlite3WalkSelectExpr(&w, p);
|
||||
sqlite3WalkSelectFrom(&w, p);
|
||||
sqlite3WalkSelect(&w, p);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user