Over the last few weeks I've been running various tests with Joplin to see how it performs with lots of notes over more long term usage. In the process I've noticed something interesting I could see causing a potential issue.
When you add an image or another file that isn't text to a note, Joplin creates a separate resource file and assigns it an id gets stored in the SQL database.
This is fine since markdown doesn't natively support integrated images, and doing so would require creating some kind of non-standard (proprietary) function. However, if you then sync the file with a remote server (Dropbox, Nextcloud, etc.), then delete the reference to the file in your note, or delete the note entirely. While the reference is gone, the image still remains in your local joplin-desktop resources folder, and doesn't appear to ever be removed from the remote server.
I would think that with the number of resources some notes can contain (depending on the user) and the number that are naturally picked up by the web clipper. If images and other resources are never deleted, this could create unnecessary problems with storage space on the user's device, as well as cloud sync target of choice. I don't know much about SQL, but I would think that enough of this would also slow down reading and writing to the database, particularly on weak/low power devices such as mobile.
Does Joplin have any kind of "Garbage Collection" function that periodically checks to see if resources are referenced in any of the users notes and deletes ones that are never or no longer referenced?