wakatime / sublime-wakatime

Sublime Text 2 & 3 plugin for automatic time tracking and metrics generated from your programming activity.
https://wakatime.com/sublime-text
BSD 3-Clause "New" or "Revised" License
526 stars 45 forks source link

Checks for latest version on the main thread #115

Closed rchl closed 2 years ago

rchl commented 2 years ago

This package makes a network request on the main thread:

https://github.com/wakatime/sublime-wakatime/blob/28063e3ac465784e9f6ccdb4a55b153405ba66ae/WakaTime.py#L754

That means that if there are issues with the network connection on starting ST, this call will freeze ST for good amount of seconds.

This check should be done on a separate thread.

Potentially the isCliLatest check could also be done from a separate thread as it's doing file IO but I don't see this causing issue unless there is something wrong with the hard drive or something.

alanhamlett commented 2 years ago

Fixed with c1f58fd05d16ce0746d544f7361d5c537e92b8e8 and released in v11.0.7.

rchl commented 2 years ago

Thanks.