AndBible / and-bible

AndBible: Bible Study
https://andbible.org
GNU General Public License v3.0
603 stars 199 forks source link

Possible bookmarking slowness #1715

Open tuomas2 opened 3 years ago

tuomas2 commented 3 years ago

Adding bookmarks and labels has slowed down noticeably for me over the last week or so. Its not anywhere near as bad as three months ago. And it is still quite usable. But I am concerned that maybe the number of labels or bookmarks is hitting a bottle neck.

I thought it might have been because I had a lot of bookmarks on Luke 12 (NASB). But it seems adding or manipulating labels anywhere is a little slower.

My dB is attached. When you get a chance you might like to see if you notice any performance loss on your device. And you are welcome to use it to create screenshots if you wish.

(db in my email)

agrogers commented 3 years ago

Yes, I think you are right - it was not slow in Luke 15 and Joshua 1. So slowness is just Luke 12

agrogers commented 3 years ago

Is there anything that can be done about the js side slowness? I felt like I had more complex bookmarking elsewhere but hadn't noticed a problem. I may have more notes in this chapter.

tuomas2 commented 3 years ago

That is good news. It is expected that if there are a lot of bookmarks in one chapter, performance will be degraded. It might be slow on Luke 15 also if Luke 12 is visible in same bible view, BTW. But not, when Luke is not loaded there.

I believe we have optimized it already quite well. Can re-check this once more.

timbze commented 3 years ago

Make sure DB has proper indices. If it does not then it could affect any chapter in the Bible that checks for bookmarks or notes

tuomas2 commented 3 years ago

I don't think it is DB side issue at all at the moment

agrogers commented 3 years ago

One 'solution' then might be to not update the highlight in the bible text until the assigning of labels is complete. That is the only place where I feel it. And because on a phone there is hardly any of the bible window visible often I can barely see the highlight under the dialog.

Or more complicated would be to push the updating of the text into a different thread somewhat like the downloading of documents is now. I would say it's not a big enough issue to take this approach - although it might be much worse on slower devices. I might try on my brother in laws old tablet.

On Sat, 18 Sep 2021, 10:23 pm Tuomas Airaksinen, @.***> wrote:

I don't think it is DB side issue at all at the moment

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AndBible/and-bible/issues/1715#issuecomment-922268865, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKGTJVAXL5Y7RWC3TN2UOTUCSAENANCNFSM5EI6S3VA .

agrogers commented 3 years ago

I tried it on my slow tablet and it takes about 5 seconds to add a label. In other areas without any bookmarks it takes less than a second. So this may become an annoyance to others once they have been using it for a while. But it is not a pressing concern.

tuomas2 commented 3 years ago

I will investigate with JS profiler if there's still some optimization left in JS side. But not high prio.

tuomas2 commented 3 years ago

https://support.andbible.org/scp/tickets.php?id=804