-
Notifications
You must be signed in to change notification settings - Fork 104
Description
We've noticed that the kolide_program_icons table frequently uses a large amount of memory, and often CPU. Currently, for cpuprofiles in performance flares generated thus far by the v1.28.4 launcher release, 3 of the top 5 functions within launcher point to this area of the codebase:
github.com/kolide/launcher/pkg/osquery/table.generateUninstallerProgramIcons found in 533 samples across 7078 cpuprofiles 5179 total seconds
github.com/kolide/launcher/pkg/osquery/table.parseIcoFile found in 534 samples across 7078 cpuprofiles 6274 total seconds
github.com/kolide/launcher/pkg/osquery/table.generateProgramIconChecksums found in 534 samples across 7078 cpuprofiles 6806 total seconds
We attempted to solve at least the memory usage issue in #2401 by adding the kolide_program_icon_checksums table -- however, switching to using the checksums table had no discernible effect.
Next, we can try confirming that the package we use for ico parsing is our best option. We currently use https://pkg.go.dev/github.com/mat/besticon/ico for our icon parsing. We should try benchmarking it against the following options:
- https://pkg.go.dev/github.com/sergeymakinen/go-ico
- https://pkg.go.dev/github.com/thatoddmailbox/go-ico
- https://pkg.go.dev/github.com/ur65/go-ico
- Any others you may find!
Completing this issue may have the side effect of solving #2271 as well.