Commit 9c60fcd
Do security attack check only when command not found to reduce the critical path (#1212)
When explored the cycles distribution for main thread with io-threads
enabled. We found this security attack check takes significant time in
main thread, **~3%** cycles were used to do the commands security check
in main thread.
This patch try to completely avoid doing it in the hot path. We can do
it only after we looked up the command and it wasn't found, just before
we call commandCheckExistence.
---------
Signed-off-by: Lipeng Zhu <[email protected]>
Co-authored-by: Wangyang Guo <[email protected]>1 parent 55bbbe0 commit 9c60fcd
1 file changed
+7
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3916 | 3916 | | |
3917 | 3917 | | |
3918 | 3918 | | |
3919 | | - | |
3920 | | - | |
3921 | | - | |
3922 | | - | |
3923 | | - | |
3924 | | - | |
3925 | 3919 | | |
3926 | 3920 | | |
3927 | 3921 | | |
| |||
3936 | 3930 | | |
3937 | 3931 | | |
3938 | 3932 | | |
| 3933 | + | |
| 3934 | + | |
| 3935 | + | |
| 3936 | + | |
| 3937 | + | |
| 3938 | + | |
| 3939 | + | |
3939 | 3940 | | |
3940 | 3941 | | |
3941 | 3942 | | |
| |||
0 commit comments