Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework debug_logger module #370

Closed
PoignardAzur opened this issue Dec 23, 2022 · 2 comments
Closed

Rework debug_logger module #370

PoignardAzur opened this issue Dec 23, 2022 · 2 comments
Labels
architecture (imported from Masonry) masonry Issues relating to the Masonry widget layer

Comments

@PoignardAzur
Copy link
Contributor

PoignardAzur commented Dec 23, 2022

The goal of debug_logger is to serialize the state of the widget tree in real time, to a stream that can be read by an external debugging application which can inspect the stream and display what the widget tree looked like at a given time, and inspect internal values and stuff.

While said debugging application has proven extremely invaluable for me for debugging masonry, I don't expect anybody else to use it, as its UX right now is absolutely abysmal. I do intend to improve it eventually.

In the meantime, debug_logger is a pretty clunky, unwieldy tools. Among other problems:

  • It requires trace calls in a bespoke format to be added everywhere in the code.
  • It feels superfluous with tracing already in the codebase.
  • Its performance for non-trivial cases is terrible.
  • It adds a dependency to serde, whereas we want to trim dependencies (Pass mutable scene builder reference to paint #10)

Now, I think debug_logger is an idea that has some real potential. In my ideal vision, it would be a record-replay framework of sorts, one that would produce a lightweight record of the widget tree and application state over time. It would probably use the tracing crate as the serialization layer, and it would do some fancy caching to only record changed information to avoid unnecessary overhead.

I need to write a full design document for that ideal logger, and then get started on implementing it.

@PoignardAzur PoignardAzur added the architecture (imported from Masonry) label Dec 23, 2022
@DJMcNab DJMcNab added the masonry Issues relating to the Masonry widget layer label Apr 19, 2024
@DJMcNab DJMcNab transferred this issue from linebender/masonry Jun 5, 2024
@PoignardAzur
Copy link
Contributor Author

Note that the debug logger is in limbo state. Among other problems, I've lost the code of the external debugging application I originally used.

@PoignardAzur
Copy link
Contributor Author

The last of the code has been removed. I still want a similar feature, but it'll have to start from scratch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architecture (imported from Masonry) masonry Issues relating to the Masonry widget layer
Projects
None yet
Development

No branches or pull requests

2 participants