Skip to content

Commit

Permalink
avoid startswith since can be expensive on some machines
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed Aug 29, 2024
1 parent 45a3129 commit 2191ae0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jdaviz/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ def _on_layers_changed(self, msg):
self.state.layer_icons = {
**self.state.layer_icons,
layer_name: alpha_index(len([ln for ln, ic in self.state.layer_icons.items()
if not ic.startswith('mdi-') and
if not ic[:4] == 'mdi-' and
self._get_assoc_data_parent(ln) is None]))
}

Expand Down

0 comments on commit 2191ae0

Please sign in to comment.