sapp icon indicating copy to clipboard operation
sapp copied to clipboard

Web UI lags

Open koftnt opened this issue 1 year ago • 3 comments

HI all, I encountered unbearable UI stutters. There are over 100 times runs and tens of thousands of isuues in my DB. Sapp UI lags because of query DB

Kim 2023-08-02 200946

More accurate ,following code takes a long time: image

Ask for help Please tell me how to improve and reduce time costs

koftnt avatar Aug 02 '23 12:08 koftnt

Hi @koftnt,

Could you point us to actual code, with path and line numbers? Querying all issues is a bad idea for big codebases. We should always add limits to our queries and only provide the first X issues.

Note that this UI is barely maintained because we unfortunately use a different UI internally.

arthaud avatar Aug 07 '23 09:08 arthaud

hi @arthaud It is https://github.com/facebook/sapp/blob/main/sapp/ui/issues.py#L448

koftnt avatar Aug 08 '23 08:08 koftnt

I'm not sure what's the problem. It seems like this should be pretty fast since this only query issues with a specific id. With the right index in the database, this should be quite fast.

Maybe we could try printing out that query (LOG.info(str(query))) and try executing it manually, see what's slow?

arthaud avatar Aug 08 '23 14:08 arthaud