Today I spent 5 hours debugging, and finally moved a single line of code up 10 lines.

Reduced cpu usage 20x.

Just want that on the record.
Basically: something that was supposed to get called once per app run, was getting called on every top-level UI rebuild, and because it updated one of the main global settings providers that update was also triggering a top level UI rebuild - so there was a rebuild cascade.
Moved the call out to where it actually belongs...no more rebuild cascade, all the consumers are now caching properly, all the render boundaries are kicking in and everything is now ridiculous fast.
It took so long to find because I was looking in the wrong place. CPU usage on the 1st pane of the app was pretty low, but increased significantly on the 2nd pane.

Assumed there was a bug there - but it was simply because the top level rebuild bug was more costly on pane 2.
The biggest clue should have been the performance dashboards showing constant rebuilds - but this bug had lain dormant for months so I didn't have a baseline for that being unusual (and there was a difference between pane 1 and pane 2 which did show up on the dashboard)
Now with the fix in place, the difference in the performance dashboard is obvious (there are no rebuild events when nothing happens). So we at least have a baseline now if a similar bug is introduced in the future.
The other compounding confusion was the generally correct advice that rebuilds are cheaper than repaints. And so a lot of the early debugging went into restricting repaints (using flutters repaint rainbow debugging tool).
But of course, regardless of how cheap you make everything and how much you restrict repaints, nothing survives a constant cascade.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Sarah Jamie Lewis

Sarah Jamie Lewis Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @SarahJamieLewis

23 May
Need a break from research, ask me any cryptocurrency/blockchain related question and I will give you my honest, unfiltered answer.
Only if we consider all transactions as equally valuable to store - which their not. Ultimately blockchain space is a limited resource and is subject to the same economic constraints as other limited resources.
Any legitimacy that smart contracts might have had died when the DAO was reversed. Either code is law damn the consequences, or smart contracts are just as fragile as any other mechanism when it comes to mob justice.

Read 50 tweets
21 May
After all the performance tweaks I did yesterday, I remembered today that dalek crypto has avx2 support...

Generating a tag: 689.34μs
Testing a tag: 424.31μs ImageImage
With previous improvements + avx2 finding a fully entangled tag (one that will match for 2 different tagging/verification keys) now takes ~79 seconds on a consumer desktop. Image
That's much less than my original estimates of ~15 minutes prior to any of these optimizations - and pushes entangled tags from a curiosity into something that is potentially practical.
Read 7 tweets
16 May
The most important understanding I've come to involving cryptocurrency is that there exists are large portion of people who absolutely don't understand the point of decentralization (of power) and consider the expense of decentralization a defect (that they can "fix").
Prior to that, I had some ridiculously frustrating conversations regarding e.g. why some structure wasn't actually "decentralized" because the power was concentrated in some entity.

Then I realized that those teams weren't actually interested in decentralizing power.
Decentralization ultimately became a marketing term used to describe the number of entities involved in a consensus, rather than the mechanisms over which power was transferred to and between those entities.

A shame, but not unexpected.
Read 7 tweets
16 May
It was a sunny day today so I did some more satellite captures. Fixed up the antenna a little, and also dug out an LNA and tested some passes with/without. I had 2 passes clobbered by METEOR-M2, and the rest were pretty low, but overall I think this setup is improving. ImageImage
Decided to stay out late since the last pass of the evening was pretty high, and I'm glad I did... Image
This the definitely the best capture I've ever had, the LNA definitely helps with the new antenna. I think if I could get it up a little higher it would do even better. I'd like to eventually build a QFH but the performance of the v-dipole is awesome considering the limitations.
Read 7 tweets
21 Apr
I see that we are talking about "Hypocrite Commits" again and I want to clarify a few things.

Despite what their paper says they didn't get an IRB-exemption until *after* they posted about their IEEESP paper acceptance and a group of researchers (inc myself) expressed concern...
Our complaints were based on the abstract and a screenshot of the first page of the paper. They have since published the whole paper:

raw.githubusercontent.com/QiushiWu/qiush…
They lied to people in order to assess their response, with no system in place for prior informed consent or debriefing.

That any IRB could conclude that it wasn't a deception study on human subjects speaks to the overall ability of many IRBs to reason about internet studies.
Read 12 tweets
19 Apr
Their right about one thing...we do need a debate reset.

End to end encryption provides some safety, but it doesn't go far enough.

For decades our tools have failed to combat bulk metadata surveillance, it's time to push forward and support radical privacy initiatives.
As an aside, I love the way that the NSPCC tell on themselves in this ridiculous report by contrasting the rights of children with the rights of "LGBTQ+ young people"

Refusing to even acknowledge the intersectionality of their own client base if a great way to provide "balance".
Anyway we do this dance every 6 weeks or so now, and I'm busy building actual privacy tools so I will let past-Sarah explain why all of this is bullshit.

Read 6 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(