Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

Commit

Permalink
Perf: Avoid call to Checksum if there are no indexes.
Browse files Browse the repository at this point in the history
Signed-off-by: Antonio Jesus Navarro Perez <antnavper@gmail.com>
  • Loading branch information
ajnavarro committed Mar 11, 2019
1 parent a95d75e commit f71a051
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sql/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func (r *IndexRegistry) LoadIndexes(dbs Databases) error {
}

var checksum string
if c, ok := t.(Checksumable); ok {
if c, ok := t.(Checksumable); ok && len(indexes) != 0 {
checksum, err = c.Checksum()
if err != nil {
return err
Expand Down

0 comments on commit f71a051

Please sign in to comment.