memos icon indicating copy to clipboard operation
memos copied to clipboard

memos.api.v1.MemoService/ListMemos is very slow

Open DLHTX opened this issue 1 year ago • 7 comments

Describe the bug

I updated to the v0.22.6, but the memos list very slow,when i refresh home page, it takes amlost two minutes

Steps to reproduce

1.Go to home page 2.refresh

The version of Memos you're using.

0.22.6

Screenshots or additional context

image

DLHTX avatar Sep 30 '24 10:09 DLHTX

This api memos.api.v1.ResourceService/ListResources is also very slow does it load the entire db file? image

DLHTX avatar Sep 30 '24 10:09 DLHTX

image

DLHTX avatar Sep 30 '24 10:09 DLHTX

Issue is not in English. It has been translated automatically.


image

Issues-translate-bot avatar Sep 30 '24 10:09 Issues-translate-bot

What version did you upgrade from? v0.22.5 introduced caching functionality that would require thumbnails to be generated on first load. This could be the cause for a slow first load

RoccoSmit avatar Sep 30 '24 11:09 RoccoSmit

What version did you upgrade from? v0.22.5 introduced caching functionality that would require thumbnails to be generated on first load. This could be the cause for a slow first load

Hi, I just 100% reproduced this problem, I deleted memos_prod.db and restarted docker, and made a new copy of this memos_prod.db. it loads fast when I first go to the page, but when I go to other page, it seems to make a request for ListResources and then all the loading of the page gets stuck. I think it might be the caching mechanism you're talking about.

DLHTX avatar Sep 30 '24 11:09 DLHTX

The request that might be sow on first load due to caching would be the /file/resources/{id}/{imageName} image requests.

Are you finding the site is slow with an fresh db? So no memos or images to display?

RoccoSmit avatar Sep 30 '24 12:09 RoccoSmit

The only other example I can think of where "the page gets stuck" is this issue https://github.com/usememos/memos/issues/3922. Does your experience align with this?

RoccoSmit avatar Sep 30 '24 12:09 RoccoSmit