Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[FR] Option to Reset Track Session #105

Closed
Drakemoor opened this issue Nov 29, 2024 · 7 comments
Closed

[FR] Option to Reset Track Session #105

Drakemoor opened this issue Nov 29, 2024 · 7 comments
Assignees
Labels
complete This has been fixed or implemented feature request New feature request

Comments

@Drakemoor
Copy link

Problem
First, thank you for adding the Track Session option. It's super useful.

The issue is I rarely restart Obsidian, thus the Track Session counter to not reset.

Idea

I would like an option to reset Track Session counter by using the Command palette.

Thank you for your consideration and the great plugin.

@isaaclyman
Copy link
Owner

I believe there's already a command to Reanalyze the vault, which should reset the session.

@isaaclyman isaaclyman added the feature request New feature request label Nov 29, 2024
@Drakemoor
Copy link
Author

Thanks for the suggestion, although I was already aware of it. I thought it would take too much time to Reanalyze all the files in the Vault (my Vault has over 5000 notes).

I’ve tried Reanalyze, and it actually appears to be instantaneous. While it does what I need—resets the Track Session counter—I now have a different concern: does Reanalyze do anything at all?

How is it possible to count the words in over 5000 files in less than a second?

I’m just trying to understand.

Thank you.

@isaaclyman
Copy link
Owner

It does actually recount from zero, and it is very fast. I've done a fair amount of work on optimization, but in reality, string processing with simple regexes just isn't that CPU-intensive. Plus, Obsidian caches file contents for better performance.

I'm leaving this ticket open because I want to change the name of the command to "Reanalyze Vault / Reset Session" so it's clearer to other users.

@Drakemoor
Copy link
Author

Thank you.

@Rudgas
Copy link

Rudgas commented Dec 2, 2024

I wonder if making "track session" manual, might be even better, as startup/shutdown seems to vary so widely across the user-base. Adding the "reset" via commander-plugin to the ribbon would be no trouble at all.

@isaaclyman
Copy link
Owner

isaaclyman commented Dec 4, 2024

It might serve a wider user base to have it be completely manual, but it would be more annoying to code. I'll change the name of the command in the next release but unless a ton of users request it, starting up Obsidian will also reset the session.

@isaaclyman
Copy link
Owner

The command is renamed in v4.2.0.

@isaaclyman isaaclyman added the complete This has been fixed or implemented label Dec 6, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
complete This has been fixed or implemented feature request New feature request
Projects
None yet
Development

No branches or pull requests

3 participants