Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Speed up event processing #8

Merged
merged 12 commits into from
Apr 24, 2020
Merged

Speed up event processing #8

merged 12 commits into from
Apr 24, 2020

Conversation

ammario
Copy link
Member

@ammario ammario commented Apr 24, 2020

With this, coder sync can perform most updates in a second.

@ammario ammario requested a review from sreya April 24, 2020 20:26
Copy link
Collaborator

@sreya sreya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not super familiar with the code but the cache makes sense to me 👍

return
}
}
if ok {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be merged with the if statement above

@@ -82,7 +89,7 @@ func (s Sync) initSync() error {

start := time.Now()
// Delete old files on initial sync (e.g git checkout).
err := s.syncPaths(true, s.LocalDir, s.RemoteDir)
err := s.syncPaths(true, s.LocalDir+"/.", s.RemoteDir)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't hurt to comment on why this is necessary

@ammario ammario merged commit 209ec24 into master Apr 24, 2020
@ammario ammario deleted the speedup branch April 24, 2020 21:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants