activitywatch icon indicating copy to clipboard operation
activitywatch copied to clipboard

First launch of Activity on Web UI freezes it.

Open JFMugen opened this issue 4 years ago • 12 comments

  • [x] I am on the latest ActivityWatch version.

  • [x] I have searched the issues of this repo and believe that this is not a duplicate.

  • Win 10 - 21H1:

  • v0.11.0:

Describe the bug

Every day, when I open the web UI and click "Activity" for the first time, it freezes for a minute. Reloading the page doesn't help. After a minute (I click Activity again), it starts working normally for the whole day.

I don't leave my PC open at night, so I am not sure if that would create a difference or not.

To Reproduce

Right Click AW -> Open Dashboard Click Activity

Expected behavior

Open instantly, like second+ time.

Documentation

I am not sure if it is about my problem, but it was the weird one among other logs aw-watcher-window_2021-06-27T15-06-42.log

Additional context

Tried to search with few different keywords but couldn't see anything about the issue. Hopefully its not duplicate.

JFMugen avatar Jul 15 '21 11:07 JFMugen

Hi there! As you're new to this repo, please make sure you've used an appropriate issue template and searched for duplicates (it helps us focus on actual development!). We'd also like to suggest that you read our contribution guidelines and our code of conduct. Thanks a bunch for opening your first issue! 🙏

github-actions[bot] avatar Jul 15 '21 11:07 github-actions[bot]

Have seen similar problems regularly. Main cause for the issue is that when the size of database has grown over time, speed of the application slows down similarly. Most likely there should be some kind of database optimizations to cut down the processing time.

d2s avatar Oct 28 '21 16:10 d2s

Have seen similar problems regularly. Main cause for the issue is that when the size of database has grown over time, speed of the application slows down similarly. Most likely there should be some kind of database optimizations to cut down the processing time.

I am not sure if that's the issue because as far as I can remember I was using this program for few days when I create this post. Database shouldn't be that big?

JFMugen avatar Oct 28 '21 16:10 JFMugen

Hmm, probably different cause then. Haven't seen speed issues on a Linux virtual machine, but Windows has speed issues with the same software.

d2s avatar Oct 28 '21 17:10 d2s

Hmm, probably different cause then. Haven't seen speed issues on a Linux virtual machine, but Windows has speed issues with the same software.

I just checked again and I don't even need to click something. As soon as Dashboard opens, I can't even refresh the page. It freezes for a minute and then starts working normally without any speed issue.

What you said makes sense as well since this kinda looks like a "loading database" issue, but as I said before I remember it was several days old when I create this post, so I am not sure :/

JFMugen avatar Oct 28 '21 17:10 JFMugen

Have the same problem. Been using it for about a month and a half and every time I open the dashboard for the first time I have to wait about half a minute before I can access any page, but after that everything works normally.

MartinNiederl avatar Mar 24 '22 08:03 MartinNiederl

@MartinNiederl Can you confirm that you are also using Windows?

Seems to be Windows-specific, weirdly enough.

Fetching data should not freeze the dashboard. It might take a while to load, but the UI should remain responsive. It must be some other weird issue.

Can people test with different browsers and see if the behavior is the same?

ErikBjare avatar Mar 24 '22 10:03 ErikBjare

Can people test with different browsers and see if the behavior is the same?

I just test with Edge - Brave - Opera GX and Firefox. All have the issue (Edge was the worst for some reason.)

But I open them all at once, so I am not sure if it would be different when I open them one after the other. I can try it tomorrow.

JFMugen avatar Mar 24 '22 10:03 JFMugen

@ErikBjare Anything I can do in this page to help you identify the issue?

image

JFMugen avatar Mar 24 '22 20:03 JFMugen

Just tried it again. After opening it on one of the browsers, others no longer have the problem.

JFMugen avatar Mar 25 '22 12:03 JFMugen

@ErikBjare Yes I am using Windows, more specifically Windows 11 21H2 22000.556

I only tested it with Chrome and Edge and get pretty much the same behavior for both.

MartinNiederl avatar Mar 25 '22 16:03 MartinNiederl

I have the same issue. I am experiencing it for 9+ months. Current system:

Windows 11 21H2 Build 22000.675
Firefox 100.0.2

antoson avatar May 29 '22 11:05 antoson

My brother just started using activity watch and it also took 1.2 minutes before becoming responsive. He is using version 0.12.1 in Chrome and on Windows 10.

The holdup appears to be the first request sent "localhost" which takes 1.2 minutes, following this all the javascript is loaded and page becomes reponsive. However the network tab is showing two "logo.png" requests taking 1.1 mins for server to respond and two "query/" requests failing after 30 seconds (see screen clips of network tab and console in chrome). Once cached further reloads have no issues.

image image

AlexW29ChemE avatar Nov 27 '22 22:11 AlexW29ChemE

Have the same issue.

Win 11 21H22 (Build 22000.1455)
Browser: Microsoft Edge Version 109.0.1518.49

Can confirm it has been like that right from the start, so even with a completely fresh and empty database.

itsab11 avatar Jan 25 '23 08:01 itsab11

It's fixed in the latest v0.12.2b1 release: https://github.com/ActivityWatch/activitywatch/releases/tag/v0.12.2b1

A proper v0.12.2 release will come as soon as people validate that the fix works without issues.

ErikBjare avatar Jan 25 '23 08:01 ErikBjare