-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pr/scraping options #857
Pr/scraping options #857
Conversation
On small files there doesn't seem to be much difference, but only large files (6mb) there is a big change:
|
api/cache.go
Outdated
aliases map[string]string | ||
items map[string]models.ConfigItem | ||
aliases map[string]string | ||
notFound map[string]bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think map[string]struct{}
is better for existence check as it allocates 0 bytes
@@ -33,11 +35,10 @@ var Run = &cobra.Command{ | |||
|
|||
dutyCtx := context.New() | |||
if dutyapi.DefaultConfig.ConnectionString != "" { | |||
c, closer, err := duty.Start("config-db", duty.SkipMigrationByDefaultMode) | |||
c, _, err := duty.Start("config-db", duty.ClientOnly) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we ignoring the closer? If you use embedded db, this was stopping it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ClientOnly shouldn't be starting any db's
Posting my benchmark as well
|
No description provided.