Initialize virtual filesystem settings only once#451
Initialize virtual filesystem settings only once#451derrickstolee merged 1 commit intomicrosoft:vfs-2.33.0from
Conversation
9ea190f to
0e5b627
Compare
dscho
left a comment
There was a problem hiding this comment.
At first, I thought we should initialize core_virtualfilesystem = -1, but it is actually not an integer... So I think what you did is the best we can do.
|
Looks good. My only question is the always returning zero. I don't understand the 'should_run_hook' code later in the function returning 1 (and i couldn't track back the callers on my ipad to see if that is significant). |
|
I'm surprised that we could spend 11 seconds calling that routine multiple times. Also, I don't think the FSMonitor code calls that routine. I thought I put an explicit lookup in my "repo disqualification" code (for upstream reasons) that is only invoked once. But I'll have to look when I get back to my desk. Either way, this optimization looks fine. |
Users are noticing slowdowns with things checking GIT_VIRTUALFILESYSTEM_TEST environment multiple times. This is likely due to checking for the virtual filesystem while engaging with the FS Monitor feature. Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
0e5b627 to
b5de7a9
Compare
Yes, this is incorrect. I had intended to force-push a working change, but I hadn't staged the change. Fixed now. |
Users are noticing slowdowns with things checking GIT_VIRTUALFILESYSTEM_TEST
environment multiple times. This is likely due to checking for the virtual
filesystem while engaging with the FS Monitor feature.
Use a
staticvariable to avoid initializing these globals multiple times.Resolves #450.