-
Notifications
You must be signed in to change notification settings - Fork 440
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
Omit dependencies' debug info #2803
Conversation
Have you tried to get a backtrace, especially in tokio task? I assume they should still be reasonable (showing info for our code), but just to check. Checking compilation time would also be interesting. |
I've added this diff --git a/pageserver/src/walreceiver.rs b/pageserver/src/walreceiver.rs
index 1fad91c8..9f74d982 100644
--- a/pageserver/src/walreceiver.rs
+++ b/pageserver/src/walreceiver.rs
@@ -131,6 +131,9 @@ impl<E: Clone> TaskHandle<E> {
}
async fn next_task_event(&mut self) -> TaskEvent<E> {
+ if true {
+ panic!("((((");
+ }
match self.events_receiver.changed().await {
Ok(()) => TaskEvent::Update((self.events_receiver.borrow()).clone()),
Err(_task_channel_part_dropped) => { and run a random Pytest test that writes data with
|
Cool! |
I've tried building on the same VM I have without doing anything else, first the regular project then the patched one, first removing
Old code:
New code:
|
Co-authored-by: Arseny Sher <[email protected]>
Cool! I'm a little worried even this might make debugging harder; sometimes it would be useful to step into and dig deeper into dependencies, too. We have a lot of dependencies and they're not all mainstream enough that we can really assume that they're bug-free. And I wonder how this affects code generated for generics defined in a dependency, but used in our code. But I have to admit that this is such a big saving that we should probably go ahead and do it anyway. |
For comparison, the trace from the "old" project with all debug info and the same
I definitely see more info, but it's relatively useless for me most of the time. Agree, that stepping into our dependencies' code in GDB feels good to have, wondering, how frequent do we need such option generally? If |
Yeah, I think that's a good tradeoff. |
Based on https://neondb.slack.com/archives/C0277TKAJCA/p1668079753506749
I did not measure build times properly, since run multiple compilations in parallel, but did not notice drastic compile time increases. CI could show more, presumably needs its cache repopulated first.
Mac build difference could be explained by them having debug symbols split off by default in Cargo:
rust-lang/cargo#9298
https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#splitting-debug-information
Debug symbols seems to be present still for the binaries with the changes: