Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make scalars is_active short circuit if apt (#621)
This change makes the `is_active` method of the scalars plugin short-circuit if it discovers that any run has at least 1 relevant tag. This change preserves existing behavior, so there are no changes to tests (which check for the preservation of behavior). Test plan: Start TensorBoard pointed at the scalars demo data. Note that the scalars plugin loads. Start TensorBoard pointed at the PR curves demo data. The scalars plugin is inactive. Use `time.time()` to log the time it takes for some internal events file (with over 30K tags in one specific run) with and without this change. With this change, the scalars dashboard takes 0.0s to load. Without this change, it takes 12.0s. Sometimes, the frontend won't load because `is_active` takes too long to respond. Granted, one might reason that a user should not have 30K tags ... but even so, that should not block the rest of TensorBoard from loading.
- Loading branch information