solara
solara copied to clipboard
feat: improve logging of reactive variable changes
The way that the log_level
-settings is set is kind of hacky right now, but we need to discuss implementing a real solution in a different way
This stack of pull requests is managed by Graphite. Learn more about stacking.
Join @iisakkirotko and the rest of your teammates on Graphite
So testing the performance, the cost is only at start-up of the server, but with this change it takes about 4s longer to start the server than without. I'll take a look at what part of the change requires so much time next week.
P.S. It seems like reactive variables get initialized twice?
This PR led to a discussion about logging, for that I opened an issue https://github.com/widgetti/solara/issues/527
Btw, I expected this PR to build on top of #515 ? Maybe a squash issue?
TODO:
- [x] find out why it takes so much more time (Iisakki)
- [ ] find out why it seems to initialize twice (Maarten)
Btw, I expected this PR to build on top of #515 ? Maybe a squash issue?
To me these changes feel unrelated (even though they both use inspect.stack()
), since one is about logging, while the other is fixing an issue. You could also argue that #515 could be based on this one, and make use of var._varname
.
The performance of various ways to get caller names was tested here, from which it's pretty fair to say that we chose the slowest way to do this initially. I'll take a look at using a rewriting this PR using one of the better performing methods.
Your Render PR Server URL is https://solara-stable-pr-517.onrender.com.
Follow its progress at https://dashboard.render.com/web/srv-co18g18l6cac73ftelk0.