syncthing / syncthing

Function params involve heavy amount of copying CRT-P0003
Performance
Major
5 occurrences in this check
to is heavy (1528 bytes); consider passing it by pointer
2785	return nil
2786}
2787
2788func (m *model) CommitConfiguration(from, to config.Configuration) bool {2789	// TODO: This should not use reflect, and should take more care to try to handle stuff without restart.
2790
2791	// Delay processing config changes until after the initial setup
from is heavy (1528 bytes); consider passing it by pointer
2785	return nil
2786}
2787
2788func (m *model) CommitConfiguration(from, to config.Configuration) bool {2789	// TODO: This should not use reflect, and should take more care to try to handle stuff without restart.
2790
2791	// Delay processing config changes until after the initial setup
to is heavy (1528 bytes); consider passing it by pointer
2774	return fmt.Sprintf("model@%p", m)
2775}
2776
2777func (m *model) VerifyConfiguration(from, to config.Configuration) error {2778	toFolders := to.FolderMap()
2779	for _, from := range from.Folders {
2780		to, ok := toFolders[from.ID]
from is heavy (1528 bytes); consider passing it by pointer
2774	return fmt.Sprintf("model@%p", m)
2775}
2776
2777func (m *model) VerifyConfiguration(from, to config.Configuration) error {2778	toFolders := to.FolderMap()
2779	for _, from := range from.Folders {
2780		to, ok := toFolders[from.ID]
cfg is heavy (1528 bytes); consider passing it by pointer
 279	}
 280}
 281
 282func (m *model) initFolders(cfg config.Configuration) error { 283	clusterConfigDevices := make(deviceIDSet, len(cfg.Devices))
 284	for _, folderCfg := range cfg.Folders {
 285		if folderCfg.Paused {