kolofordjango / kolo

See everything happening in your running Django app. All without leaving VSCode
https://kolo.app
486 stars 14 forks source link

VSCode extension consumes high CPU when it cannot process traces #48

Closed Real-Gecko closed 11 months ago

Real-Gecko commented 1 year ago

As soon as extension is enabled I start to get a bunch of errors like ones on screenshot, VSCode itself becomes really unresponsive and starts to consume a lot of CPU power. With Kolo disabled everything works as expected.

image

VSCode version is 1.74.0 Kolo extension version is 2.2.2 Kolo middleware is disabled on the project.

wilhelmklopp commented 1 year ago

@Real-Gecko 👋 Sorry just saw this. Thanks for the report, definitely not great that kolo uses so much CPU trying to process traces/invocations and having a negative performance impact on VSCode.

Kolo tries to load the most recent 10 traces on startup, looks like there's maybe something going wrong if many (or all of those 10) are not processable, I'll look into it.

Was there any further context in the error message / in the devools about why these traces were not processable? Do you remember when you last used kolo to record these traces? Asking because we made a breaking change to the underlying trace data structure in v2 which was released in early September.

As a quick fix, you should be able to rm .kolo/db.sqlite3 so that there are no traces for kolo to load upon startup.

Real-Gecko commented 1 year ago

Actually I was unable to see errors details, because they were appearing all the time and VSCode was really unresponsive, only killing it from task manager worked. I'll try to delete old DB and see if it helps.

wilhelmklopp commented 1 year ago

Dang, I'm sorry for the shitty experience...

My best guess at the moment is that these traces were generated prior to v2 so the latest kolo extension doesn't understand them. So deleting the db should do the trick 🤞