Untagged

Same for me.

This is actually a good question. Some devs don't understand what semantic versioning means. Since the OP mentioned it is WIP, it should have stayed at 0.0.X or 0.X.Y until it was stable.

We don't enforce versioning rules, so there's nothing we can do on the Joplin side.

1 Like

@BeatLink, to debug high CPU usage issues, a good way usually is to run the app in dev mode and open the dev tools. There you should see all the messages between the plugin and main app, and usually you'll find it's unnecessarily sending certain messages.

@BeatLink As I mentioned above the problem ist the loop with the endless caling of tagNotesWithoutTags() and untagNotesWithTags() with there search functions without pause or trigger...

I will find a solution to the loop and high CPU usage

The plugin reached a stable version prior to publication. Thats when I set it to 1.0.0

After that, i performed a major refactor of the core logic, switching from a hard coded tag id to a user set tag name. Such a major refactor required a subsequent bump in the version number. Hence, 2.0.0

Will do. Fairly sure its due to the infinite loop. I'll add some checks in there

Thanks mate! If this CPU usage gets tackled, this would be a really nice plugin. Thanks for your effort!

I just pushed a new version of Untagged. The main loop now has a 1 second delay before running the worker functions again. Should cut down on CPU usage. I also took the time to refactor the code a bit.

I'm still not sure how to solve your issue. Especially seeing that my plugin uses the same search query that you tested with, to find untagged notes. Have you tried recreating those 6 notes?

Adding a second delay to the loop is only a workaround, but not a real solution. You have to trigger them on certain events, not run them in a loop.

I think JackGruber mentioned something similar.

1 Like

@BeatLink, indeed it would be better not to use a timer at all as it will needlessly consume resources and drain the battery.

If there are some events you might need to get it working let me know, as we can always add more.

Ill look into it once i complete the recurrence plugin

1 Like

Hi @BeatLink,

Thank you for this plugin. It really helps me a lot.

I am running Joplin 2.6.2 on Windows 11, and I have been facing serious display and performance issues lately : unstable notebook scroll bar and very low general reactivity. I reinstalled latest version of Joplin but it did not fixed the problem. Then I disabled all plugins one by one and I found out that the "Untagged" plugin was causing this... :confused:

Am I the only one ? What should I do ?

From the posts above, no, you are not.

You could try disabling the plugin and just searching for untagged notes using the term -tag:*

oh, indeed ! thank you (bad english + nontechnical user here).

I will try that. Thank you :+1:

I'm looking into resolving this issue. For now, i highly recommend deactivating the plugin

1 Like

@BeatLink, is this plugin still supported? As I couldn't find the git repository for it. If it's not longer supported perhaps we can mark it as obsolete?

1 Like

I suppose the code is here - Code / joplin-plugin-untagged · GitLab

Thanks, that must be it. Somehow I found a GitHub link earlier which was 404. @BeatLink, as I understand two issues have been reported with the plugin:

Not sure how easy it is to fix these. In any case I will implement something to mitigate the second issue.

1 Like

From a cursory glance I think the problem may be here:

/** updateNote **************************************************************************************************************************************
 * Tags the given note if it has no tag. If it has more than one tag, it untags the note															*
 ***************************************************************************************************************************************************/
export async function updateNote(noteID){
    var untaggedTagTitle = (await joplin.settings.value("untaggedTagTitle"))
    var untaggedTag = await getOrCreateTag(untaggedTagTitle)
	var tags = await getTags(noteID)
    if (tags.length == 0){
		await tagNote(untaggedTag.id, noteID)
	} else if (await joplin.settings.value('untaggedEnableUntagging') && tags.length > 1) {
		await untagNote(untaggedTag.id, noteID)
	}
}

On every change it would repeatedly tag and untag a note because it never checks that a note may have just one tag that was set by the same plugin earlier.

Plus I think it doesn't handle pagination in a few places.

Hello everyone, sorry for the delay but things have been hectic. I will try to resolve the issue within the week.

@laurent The ideal solution however would be the implementation of Allow Plugins to load search query via API

Once implemented, all the plugin would need to do is load the filter for untagged notes into joplin's own search bar and then joplin's own notes list would load all the untagged tasks.

No more need to poll for events, and to tag and untag what could potentially be thousands of notes. Finding untagged notes would be an instantaneous database search.

And its not just untagged notes, With the existing search system and filters, the possibilities are endless.

Plugins could store search filters for overdue notes, notes due today, notes with certain tags but excluding others. If plugins could manipulate the contents of the search bar and trigger a search, joplin could become a lot more powerful.

The Joplin favorites plugin GitHub - benji300/joplin-favorites: Save any notebook, note, to-do, tag, or search as favorite in an extra panel view for quick access. is pretty much all the way there in terms of what such a plugin could look like with its saved searches feature, however the saved searches function is crippled by the lack of access to the search bar. Currently, all the plugin can do is load the saved search to the clipboard and set the interface focus to the search bar so the user can paste the search query.

It would be a huge favor if this feature could be landed in the next stable release