Modernization Hub

Modernization and Improvement
The Joy of Coding – Episode 75

The Joy of Coding – Episode 75

hello and welcome to episode seventy five of the Joy of Coding my
name’s Mike Conley. We’re gonna be
investigating some Firefox stuff today – it’s gonna be
a good time. I’m just popping open my
IRC client in case I need to talk to people ah yet gonna have a a real
good time ron I hope you are too ah lets get started
what we to day heres my green here the agendedtodayisoctober twelfth a
reminder that no
plansurvisedbreakfasttas kind of roughroadmattasimen much on it I assume
that this parts going to take most of
the episode well ill find some stuff to do but I
also just a check the record mikes working thats good okay so I this
is the agendas kind of a useful stuff in here you might find it
any to click on links and follow a long
as I go this agenda is actually available to you
if youre watching the sun air mizila you
can scroll down to the ollingsectionyo’ll find a link to it I
just put it there if you only just got to or I just updated the airmazilapade
so if the link a you go to his for like an older
agendetreelof the page because the the newer the newer gender should be
linked there am and yeah you can I elingsiffallong as I
aptatethisinitsenranizes then you know
reload the agenda all the stuff so what are we doing to
day a to day I am trying I’m I’m tackling my old
nemesis by old nemesis was the old nemesis well ill try and show
you is actually a hot harder to show you
these days because my nemesis is harder to come by um let
me see if I can so you an example um lets pull up a bit aghedtemale standard
and try and do some tab which in her I think
I can make it appear if I do the way o no maybe I like look the tabswhich dinner is what I’m talking about you you
may have heard me talking about it
before its this thing that can sometimes appear between taps which is
um and I’m having difficult o there it is
there tis it was there for a quick
second I don’t know what was going on I can
actually dumped profile for that one um but thats what I’m attempting to get
data about um were trying to defeat it its it exists
in a for users that is enabled and let me quick I ive been
like I had a blog post this um thing is called the
tabsbeenervddomyimaeove obowtaprofilyg but on my blog if you
visit my blog ive got something about have piner um yeah otrolsisthebig piner of doom and I don’t know what the images I don’t know why image is
missing but what it is is a this blocposekindovicdescribeswhatidis’l
ltryangodescribeitdmyself basically when we have a content process ah in
that content process we like switch at I switch to a tabthat’s in that content
process we need that contenprosess to give us something to paint so the
contents of the tab that were looking in
that we just switched it on paint the contents um and if the content
process is man read is busy if it cannot it its doing
something else it doesnt have the ability of pain just yet then
the parent process has like this time out where goes while I havent
gotten a up a frame to paint from the
content process long time so I’m just gonna show a
spinner so that the us or knows that ive the browser itself is still active
its still alive you can switched
habsocan open menusandstuff it seems less hung as a as a as a
browser but the contemprosesitselfoes not showing you
what you want and thats particularly
frustrating as your swuchingtowbsind you might like want a particular thing
ah I notice now that I god cuplisahingaveezoman ereis that as which that I hopefully captured in a
a in my profiler here spinarshownsince which finished finish stamps which
spinershon was there and what was happening while the parent
process was fine the content process
down here was busy doing something what was a doing it was
re styling things it was busy restaling a page in response to a be sink message so it was doing style computations and
that took a boat wow its of a long time about a mine n a
half or men and half a bout second in a
half one for ish seconds to do so calculations
and in that time I was attempting to get it to pain
something and I couldnt do it so after
we started the switch the right here we start showing the spinner
and then whenever the contemproses
finally freed operate here we forced the paint and then a this
is where we stopped soinhspinersowehavehesolemarkersanyearsh
owingworethespinnerwoneawaysa this is
word the bay that happen in in this case we were busy
doing a re style and so what we started do is fine the places
where I find that the content process is
sometimes doing things when we want paint and um interrupting theconteprosesforcingapaintaodthenlaying
it continued at the stragynonillemejus for a second in a non e in as case a
what would be happening here um lets find out lets open up a non eatness
window I’m an open up there he ecttyemalestandard in this tab and like are the kind of paraprocessis really bog
down its like the whole thing starts to jane the whole thing got
really awful there like this is what you get whenever you
don’t have process separation you had the super unresponsive parent
process is trying to calculate this sum this document it doesnt
evbyeatsblockingthemainthread not in the eatinasscase its much like
smoother the jean witch still alive the content process however
is bog down and thats why we get our lee spinner um is because the conteprosisis
bog down but the parpros I still acted like an still switch tabs
and paint things so its improvement the spinner is aid is a sort
of um it is a replacement for with the browser
just being completely blblam being completely like hung thats the
thats a I like a I’m thinking behind it if you
are seeing the spinner than in the nine in a case chances are what you would
have seen is the whole pro like content
per the whole rouser being unresponsive so we as we
think its not huge improvement youre still not seeing
the webcontinuantasee but the fact of bowser is still responding is strictly
better than the whole browsornatresp during the tabs which thats what weve
got now what are we doing a fix that so
I already talked about some of the stuff were
doing a weve got this framework in place where we are allowing we had this like
so we have multiple processes in each
process has multiple threads and there
is the main threat in each process in the
pairaprocessinthecontemprosesis the main
thread in the main threat the count process is the thing that needs to do
the painting and I if the main threat
the contemprosetig it gets blocked up when we want to paint
well thats when we see the spinner and
so we can do is weve made it so that we can
tell a separate thread in the contemprosessthat we want
a pain right away and what we do is um is fit slip of value we set of value on that
thread that shared between all of the
threads or shared between I should say that
background thread and the main thread
and the main treadtwald busy work is periodically tracking that
bit thyvariableiniatlocinnat looks
adinsays o eventually will say oh so he was to
pain I bet to drop what I’m doing paint
and then made back to what I was doing before and
thats kind of how works we set the variable the browser rein the
main threathaconepros I realize we want to paint it stops what
its doing it paints and then it
continues whatever was doing for and what that means is even if the
contemtproeslike this first bug was the
big one um that if the conteprosesis running
expensive javascript that was a big one
we had it of the kit like your visiting a page
and its doing something really weird
with scrip like for example what if it was um
ah just running a will I ill show you that right now I’m in a
trigger a while oh you can see the babe
my screen the me just t that up in paper fit I in a run this
busy loop this is a a wild yet ever gonna exit and I was gonna run that
and ive how my
cougntemtprosisteesdoihavertnow I got two content processes but I’m at
least I’m that there are some of these constant
processes that are a or some of these
tabsarshaing contemprsesso I mean I run this will
loop and that is going to effectively the main threadendthcontemproses and yet
I can still switched to abs a
constillswhitch as I might not be able to interact with
the tabs like heres a tab for example that I cannot interact with a male to
paint it but I can not interact with it
and when I I am not updating the paints but I’m
still able to switch to ab so were doing this like allusion
where weve been able to um hey this this main tread is blocked but
I was able to force its paint even
though was blocked a and we also exposed to me why
that allows you a like stop the busy jatiscriptand thats what ive done in the
like thus myclicks that were sued accepted um so thats one thing that weve
got is this sing of paaftabpainting I’m more
recently we landed a g yield is in todays nightly like I had only
just showed up in todays nightly where
if your main threat doing a garbage collection is kind of
related to jabcrtbutifyou’ve consumed a
lot of memory and your main threat is garbage
collecting so its trying to find the
things that are not required any more of the
things on the heat that have been
allocated that thing is referring to a more ennaunce
getting rid of them missus sort of
javosgipdworld ah normally that you know take some
hopefully fin amount of time on the main threat while
now we can interrupt the garbage
collector paint and then continued garbage
collecting there is another one in the
pipe as well there is tom ah this one here bug one three oas six seventy eight which will lost a pain
during cycacollectioncychalcollectionis
sort of m a counterpart to garbage collection um
in that I mean the is attempting to find ways of reclaiming
memory but cycle collection find cycle like reference cycles in an or a native
code or in our coding general it looks for
reference cycles and then breaks those
cycles so that if there is anything in there thats no
longer referred to once it cycles broken
than we can like reclaim memoryalowsusto prevent leaks where you
know we have these referenceslopes I am so everything looks like they are
things point at them but its all just
like this discreet trunk that nothing outside of the cycle
can poynaitso we have cyholcolector that we can also soon
hopefully interrupt as andrew a great is
working on I am so what else can we do well I think
we need more at these were the big ones
javoscrpsgseandcc where the big ones
that we thought we need to be able to interupttis I
suspect layotan style flushing as
another one um but we need more data so ah one of the things weve been try to do
and weve had middling to no success
doing this is asking r users for performance profiles like
these sorts of things I was just looking
at give us a sense of white whats going on
when they see the spinner cause we its
different from are a computer in like some computers
are stronger than others might I have very high powered back book that I do my
engineering work on and that is
different from a netbook its running window seven that is shipped
in like you know five years ago I’m I am I think thats on windows
sevenssolvillyesibelieve tom so we need more data about what
people are suffering from and why so I turned that we have a
mechanism that allows I gather what are called thread hangs um
I auorady to its been an gecko for a while a you
of your tilematryenable and you should
go to about to trend we had the sincled browsrhangs and
thread hangs to go to brows or hangs a if youre not on windows I think its
always empty a but threat hangs is
populated with stuff and this is showing the thread
hangs in the main conaddthe main process um its a basically these these his ms or representations of how many times
I had this particular I had with this particular stack um and so
many in many cases its like their wont off like I had this
one only one um and uh with the menuskeeretha I
should only I always saw this once that it took about a hundred and
twenty eight seconds I think I’m
something like that and over her ah I saw at the sang once
at about tore fifty six seconds and this is what is but this is
a work across o threads like that she the main
treadbytalsoas one for the feasting
thread the image bridge led and the process hang on it or thread
and we can collect these history and get data ah which is nice that
submitted to telemetry and we can then
like analyze it using um things like be a jar
beach are so this allows us to look at this is all
open you can look at this too you can we at the sort of things that are um
causing hangs for our users a some of them unfortunately heres one
of the problems that these um stacks that were looking at or were
called soo stacks meaning that theyre
not true ofstaxks’casetowsaectually very
expensive sit compute and we cannot get
them in our normal bills because in our
normal builds we do a kind of a
optimization frame pointer stripping where am it
allows function calls in the application the browser be faster
which is good for a users but it
prevents us from actually respecting and finding out what a third
a certain callstack like where were rain threat is and its in its call stack so
we have this mechanism for sonostacksah where we basically
instrument a bunch functions manually and if we hit in
instrumented function o then it appears in the sudo’sstack and
that allows us kind like get a sense of
where might be for non nightly bills cause I
want to point out something we don’t symbols from nightleybuilts so in
nightly you can profile you can get made
of stacks um and its great I ever things can taste
on nightly um but everyone else you you we don’t get a we don’t get native
stacks and as a problem because our
native population sdeafnitelyanotbretrepresentative of our
actual like full user population native tim is significantly smaller it
significantly um id say more a technical people probably
with stronger hardware or what I echniclywoapeople who are not afraid of
running nightly software like um edge on the edge software that you know
and I’m like or night population is as they they they are very
youmieuh say and our steed in their particular
way that our or normal release and general population is not so we
can’t really look at the data or had just the data from nightly we have to
get it from everyone else and so a weve got these say hangs and so why
don’t we use this why don’t we find whats going on in the content process
cause we actually get content child or cunteproes pay loads were able to see when the content process main threat
hangs its called gecko child is the name
of the man bread in the content process so why
don’t we use this well one of the
problems so we could use this thats a good idea
but we I know which one of these hangs occurred
during a atapswichit’s not entirely
clear or any one of these could
avoccurreduringtattapswhich probably
they did occur during it which but I we can’t tell we don’t know
so luckily there is an off theres a feature built into our a are
hang detection code that allowed to annotate these hangs whatever were in
a particular state and ive written a patch a in this bug um
gather cliinsidestaxsis but one thirty three o
seven seven if you want to follow long
ever tin a patch that I just cut our my is for me and to
track that of a second that basically anitates the a any kind of hang that we during a tabs which with this
anitationofsisforcepaintin progress so the long on the short of it is if we are
in the midst of a of a tabswit h and we had a hang on the thread or any thread that were according
but in the contemvrocisothingisjust the
main tread um if we had a hang on were doing taps
which the hang will be decorated with
this force paint in progress anitation and
then we can use automation to extract those hang reports out and that will
give us good data or certainly data on where we need to focus our
efforts where our most people sing hangs whenever their trying switch
tabs and we can use that data move ford and measure our progress so thats kind
of the plan I just got in our minds on
this patch lets find out what I a what erin clots
had to say about it ourmiehesays this looks mostly good to
me but I don’t see of course my
calleduonregister nitator any were here youll need to call
down the main threat in hangmodertor
child is destroyed failing to do that will cause be that
crash of hankers after the
hangwonerchildwas gone ourmiesjustbecausei’dlikedtotakeinothe
ookat at once that calls in place okay
good so I’m glad I got the right person am I
of the right person reviewing this code and so I need to I if we take a lot is
patralquicklellallsha how works so taking advantage of the
force painting stefferarty doing and I’m this is where we like her ah this is in the content process in something of the
hangmoner child were in or a separate
thread not the man bread raxyemon’s called the monitor ah
thread um under threat and we receive a message
that says I want a force paint so we say forcepainas requested and I also may say
of force pains in progress and then am when the when we we can
enter this interrupt call back and that usually
occurs whenever jashas been interrupted
or jc has been interrupt and if so then we say okay well if a
force pain had been requested man to do this like lolkings were doing
multiple threads and stuff then we like a child okay now now that ive
interrupted you force paint now and thats great now ah but we we also no is when this paint is done like we
want it that we ought wont understand
where were hanganhangng until this paint is displayed so its not
enough to dislike stop recording here we
have to wait its displayed so we have this method
inside um a child called notify painted this
method is called whenever the tab child
actually has is nscomposit so presented to the user and
so a we I call clear force paint on that ah ah side that method which then I make sure
that we can clear the force pain bolen that
we had set before and say that the forcepaintis no longer in
progress so then we also have the time
called the a tater that we register where do we
register register we register and anitator here ourselves
the child that if we see a hand will call and it ate hang over here and
so and that we get a lock a because were
inside the hang thread or the hang uderthreadwou shake to see if
batbulionis true and if so then we add our imitation so what um
what a clot as saying at this register anitator needs to also
have the other side of things the un isteranitator so we have to find out
where that oh were d be a good place to
put that and then what we did the patch so lets lets do that so I believe its
going to be improces hand or some red registered anitator right
here um inside something called create a
hangmoner child and I don’t know if there is a a delete create hang her child who calls create hang on her
child ah thats called by process oh by her content child in process motterchildinsisomthingcaledalitadepepro
sess angmoner child so there should be he alice process or p hang what was I create hangmonerchild and monitored child peprosa’s hang child of her shibiad alicatethealicadep process hangmonerchild there is not the alice pepros shes no such tame where is it the
alcapepproess haingmoderchild I guess has not been
implemented its its like its just not implemented
here um I guess it doesnt need to be
implemented um its a no of so maybe we need him meant that um yeah roses hingmondersirlike a shut down here that don removed process at some a pair process a mother child shut down this is probably what we want who calls that oh thats just the implementation in process hangmoder inside observe ex
become shut down if we see nextpecomsi and then we will shut down ourselves
okay and this is what we do so this is probably where we want to a
unregister or anitator am regis annatator were gonna unregester hang moaner on register anitator and is probably us I think its that because we are an
instance of a hang on her child yeah yeah oh thats on the treathossigan register anitator we with
thread is that a on the main thread okay and that we all want to this on the main
threat okay good and then miss goes and
shutststoun me the hang her thread okay get so I think thats why ah that should be some patco I mean pomp of
the fancy con going on here just building bynarius yes yeah okay building has done yeah lets now hear heres the other problem
with it I can get Mike it appears to be working here is
how I know its working um if I go to like the w three sea or the what w g standard is actually my
test case I go to uttubeand go to the what g and I like taps which a
bit the spinner I get the spinner again I
got a spine and for a long time thats my cause its
doing lay I know that one and thats not a new one thats a long way
out and then I mean to do a brows a contentualbox and if I get the um I know that if I do like components
utels import resorctearan models tolemetriessa in dajeasthemand I do tolematresasonget child thread hangs her thing is just
like get the red kept hang thread what is it threadhangstats maybe I want to get to
lemetry maybe thats what I want I want services dojesamsadandwnybumppotthe fine
her and I as servsistelmtree thread
hangstats of these objects and if I look these
objects I can see I got these hangs and do any of them have the anitation ah
heres one anptation object force it paint improgrosetruts of
this hang um hang was a some time went on some content grip went off and we were
hanging and we were trying to paint so
thats heres another one I’m we received a some refresh driver we were doing at a
notifyinglowe were hanging in heres another one for paying progress
stack we were doing vesingquerestylerulesgaabthisisthe
styleflashrgther um year as yet another one so this is
working this is this is this is worth now weve got so here were we received
some real moceevenweare despatching the
venom I’m in the hang at a lot of and being here um lets make sure that we
can also find ones were like towards we don’t have it so good yet
gone now so the hangsbeenthethe anitations been cleared so thats good and the stack was just that and hes a
newer one stackasher some kind davtools stuff proulyecause I
opened up the brows a condentolbox I’m good so that appears to be working
properly I am in a shut down good um thats probably okay I think thats
what all aronadsum sumgunaamanmy commit with that chain I pushshoitupfurreview again and we do it on time on thirty three were very three mints
and ive done a lot of explaining havent
done too much right of a of patches while so here is
earswere a things break down all it I just kind
of show you the the places where like I prove to you I think that um its
working I can heseanitations in the anstation system
seems to work um but there is a problem in the problem is
that a dozen look like while all of
dhemstraigtinsycond so on publishing this patch yes am I a respond to erenclots a godcatchfanks so publish so I’m lets look at the internet make sure
nothing sneaky ye snuck in books difference between
monyyedustabdatthautwine thats fine and so thats thats that so I wait for
review and see whether or not do a class wants
to look at it I have updated it I’m on hoping that he
still our question marked on it less
stick a look yes he has been re requested on review
there yeah okay good ah the de so what was he talking about
it I was saying that it doesnt look like were actually like
we are capturing the hangs correct or not like displaying them and heres
what I mean so and a trigger another couple of hangs
got the spinner spinners ha spines totally happening spiretiving for
a long time I am master like freaking it out by
doing so may hangs here so many angs a big tapsbenter what was that like thats crazy what that
was and if I go to about lamatry out expect that the child
payload would have some of that data but a dozen am this this pay load is like like when de the start this this palodis
from to day but ah I don’t like this as death but not enough this week theres more
information to be gathered here like if
I go to um service is dot telemetry to thread hang
stats um this is in the pair process and I
shouldn’tlike there a bunch of hangs here if I try and
get the child hangstads a telemetry gather and get child child sir way I can like flush badge telemetry I think I can only do that in
the contiemtproces actually um if I open up the content process and the brow with the brows are
contentual box in me that here and then ah I do like components he tells import breeze scearymodullslementreessassondages then like telmatresesiondaedgetpayload has the stuff I need so like hers our threadhangsackskeccoe child its got
fourteen hangs in her but if I go to to
em at an here ive all got three where are
the rest of them like yeah like did they get squashed or
something like where are they um heres the zero the one thats it is it
even there receive a sink message this first not even in here like where are these
states this is what I need here so there a bunch of stackstarindnone of
these have anitathere’sonthathas aitation that we want weve got were in
year running a flush lo um heres another one oh we got a native
stack somehow I don’t know how that works but we did a
oh no I have no bmazcausisenightly local build but like
oh its a native sakes super long hang thats why I think it was
like um mister m range value yet was I was a sixteen second hand were there ah
and yet we are inside ah by the style update a long one and we like where are the wire these listed in here I’m looking at
the child payload so whats the deal so the heres what I’m
gonna do am I need more information on how like I how this payload gets gathered and I think I’m gonna ask chris hutden
cause I think he knows about the stuff
so I’m in a conversation with that fellow pull up a ah rsechanneltelementrye and in cutter swillingtohaveaconversatinwith me and if he doesnt have it and there is tom all right so chris hadnt one of our brilliant
brilliant engineers I I like I think I am yirdtiscallmchatnesofhis
names longer than chrishandter’smore to
his name this I don’t know I I I think I all I
butchered at last time I tried to ron smsoncalbysarsenicchatonsaidcatton no
how did thildpersestolematurworksum how
often a are the thread hang stats or how often is the load gathered from the content process from contemprosesses how often is the is the pale gathered from
contentprosesses and sent to the parent yeah yeah yes I went on an answer there at no answer
there cause I I tried to look it up like cat
appearing through the code and this the faster oh in which builds lets nightly and work our way up yes to so I onterprosestlemetryenthe main process theres this other bug usefullanddropowa since my notes fixed ten fifty two so recently monfied five days ago oh my yeah oh because some
dependnshe’sweredebutetwas actually
fixed twenty two days ago which is were
accumulationsweforethegotto be two
sinsold are sent to the par process for
aggregation yes how a thread hangstats yes threadhangstats is not supported is that future go or just the thing were
unlikely to do yeah yeah yeah yehantats as the old child palosmachanism okay a chased kin you briefly how is that lmechism work yeah like how often is the child payload sent so the parent yes yeah yeah the reason I asked is that ive got a
with in and I should say we have got a and to such and such that and s hangs that occurred during a tab
switch I see in order to have a vote tamatreebeupdated with the data from the
child I need to shut the content process down
properly and not the kind of crisis down properly yeah conrtentrolsshutdown whence at fired
notifidnotdwnmotfiobservers yeah I had received the request to shut down
okay good childshoteandthenrelaobatomeshou
ngaboutaboutimstrinughtake a firecolcritokaysoitsea closes clothes
clothes close clothes and if I go to about performance I should probably only have
the one contemprosess soon yeah yeah it keeping that contemproess alive yeah well whats keeping that contemprostas
alive yeah its two fifty never two fifty a two fifty me right there nighlywepcontantnotdeinga whole lot
sample whats it doing running a loop rinsidema message trap were just like in waiting oh I a unique distinguished a mount I closed that for a while will the
cintemproceesgoaway two fifty yeah oh now what of doing yeah not much it is just waiting yeah so I like goat read it what do I have I should be shot dothiscontetprosessowifishoulddonthistab yeah a process is not young thats interesting I not because of thing I am running maybe one of my adams a sablestatissar table that silags hi and then do is I mean a touch my debugger to my parent process sehielevits two forty eight yeah and then in side I have parent so shut down so actor destroy yeah he alkeekedtavidcontentparentmaybethatsw
iinydtolookinsidecontentparent to alice a great prowsoraveen destroy one where as that shut down shut down process yes ntemtpredactodstroy no I I have de strong as what we want it or notify actor destroying not like tad
destroying so said break point here okay not I have the stroywerinherethe
singletongetcuntr pi the increase nomderstrointhaves weet the
number of tabby is the number of destroying tads so
howmeches have I desedsotlength so were dying now start the force kill or oh you know and ive got this like old press yeah um yeah now its gone so well that thats good so a emproctess went away as we expected
or should have worse yeah two
foryeightsgone so now its
takelooincideabout selematryam child tread hangs now like look thats thats
not right a red hangi’l there we go at this
saparepalofagain the child paylowditsempty thats no good hmm menrelods closingtisitionit be that you could
also call in a
piclldrquestiooppisweteremovetanerdly okay okay thanks so on shut down we should be setting up
those hangs I don’t know if thats working properly as the child of the jason child payloads threadhangstacs we don’t have nearly enough in here nearly enough yes yeah yes yeah oh oh we had someone here thats good in some subsessions so that works some saved sessions no I’m main pang parent ye I oh yeah we got some in main ping okay
may I was just looking at thwrongonce maybe I was looking at the
wrong like newer pang at one forty nine I was only a couple of
mans ago stead of looking at our current pingdaa
childpayload hey now ive got some june ad so was working its working this patch appears to work so now if I
look at like struck sure a hold on kecochi t sonaentationtheresonanitationthere encing message we go older in the child yeah the galleys good old niscoredokaybutthenoneof them like we
don’t have visible itations here but they are anitated mis
is fantastic missus van so it appears to be working okay good
there are couple of mysteries now why the paraprthetcontevrusaswasn’n
shutting down um have like some kind of preference that
to his double check shut down a tool kidasing shut down crashed and shut down time second five yes thats
all right so that appears to work okay so lets get that reviewed and then we
can analyze the data a standing I’m it just got ourmiesty I think a oh no thats just the the old
state okay hey okay fumbszulat’slet’s play a sound whats this is not worth by my old tablet a things that I just
tried to save a screen shot thats not what I wanted and now the sad effects are broken brain reload my oh thats what I want so this is blocked on review now there a
couple of our things we do here um make it easier we could
make try and make it easier to pick out be ah amitations from from about tolemetry however the ones I
really care about like I care about is getting it out of um
getting it out of for like serve from our actual users
thats what I care about so I care less at like them or an stuff is up there so a man I am
actually really happy about that so
thumbs up good job everybody I expect that to take the rest of the
episode but the patch that I rode
appears to be the job or at least I think its doing
the job and well see what and will see what you know a bill and am everybody think I am sad doubwoul check
a thing content rose should show up content process causes spinder yeah yeah ontiemprosess goes away okay reload to lementry and paying child payload to okay good good good good yeah to thats all good or um what do we do now what do we do now and so where we had here um patch up for r view
addressed clothes review commence gods botstilemantry to show the data so I trust that I was obobzofoot tree like when we go here if we look at
a child pay load we look at the actual raw payload some anitations yespheare lovely
aditationsforcepaintidp progress excellent excellent very happy about that okay next ah what do we do in now ah so
there is this that ive been looking at um switching us from a as well treat to his willrichless
box or he outocomplete pop up and I got some rvewfybackandteihaven’ten
read it so we should read it through so tell the air from
matnurbergoutfurwealrefacltest his bug and idealynoedetapeforelainganew
inflondationaisto ye properly so I may rest from going off
his bus reviews because it seems like the pavervatestindthemiddlefthesieries
of commenced related change the beavior
of the feature ardrmiknowifataschangeas because
omtingbrofrsustupdatngintoneursstyle a ecesveryaredtereadcomparedto how they
were a few years ago in reviewing the
changes is a pain in them as because if tools of heart I ieimagnth
heo so no or make it iffenciesuterviewthetim
einghismadicampleteventsisimportant and I worry that youre making a
testnolongertest some things it needs to
frxanplewenyoudin’tsrethat the user its enter while not a complete
popboisopen and entries selected at a
value complete into the impact for the form as
submitted if the pages of somepceurankiy
events nisilyregressatbatorbut I worry that you
may olhercaschuttouegressioniivan’tspent
thelongtime ndbesgavyoureonfict changing a
ralvantimebcause it seems very
teaasweswydeputoffhisreviewandtha as the new nato away the cost is free
that such made a change that
testhorswasladsomdays from a push that we rise in
lotationsointermantescishommore easily with the testryfactotaerstlthefuturyinle
mentationitwanterefactthetess casjustwedo that in the new bogafferling
ideallthatbywacsfedthre factory in him of any smalrcmites with
easier to read dis okay tom where is this us move this back to
worching a good reason for this when I firskinast
ewasamove valuable commit comment
kindifcoiisbattisma the extasions of existing tests I’m more content with the
scmiszalthoutprapt I commit message podgies for the delay I
rolsio mentioned sscomorthrehonesunaritherwaynomoretieyto
stilldthem clear I as trying to be
conscious of the time we take tad those tests and didnt want to just s
infortebcause said on irs that it was fine of
modernizing the task but I expect to be
done the middle of the series of this
bug nor to xxpectivstatwhere that hard to
follow us tolseskitihadreacentlyupdatdor
otheraurimalytestanother this here and split them in a much small
pieces for review okay so the patchdthearrowsalitleoverwhimingi
sthirmassagegingaing like I change a lot um I like this is umongest change in here um I like ye I rewrote all this test all
these tests ah and a little bit easier to reason
about in my head but I think its just hard to review a m and
that wants to know at this hatches all about he likes this stuff though so I guess maybe the question is can we can
I get the as to pass using richless box yeah m and then moved this refactor out move
the refactor may be split it up in to a bunch of
smaller commence so that
sesardorovewokay I think tresnalockawellemetelemsobcasetitsousaee
hefeels bad about it yes I understand this is a massive patch I understand
that the test refactor its a mass of patch I am I can imagine I sometimes I forget but am big efforts like the ad that big changes
like this are a pain to review I agree that
splittingvetestryfactoroentoits bug that is useful not only sanity but also to I’m sure we and sure
a but so to help figure out where intermetants
might be introduced good thinking I’m I will attempts to make a current tests with my changes and then file a new for the testaryfactoring yeah a smile yeah okay m so vilanevuge let for anger yeah refactor some otto complete to be more readable and readable and a contained yeah yes yeah yeah as form or to complete is an example a test where that was written before we had nice a
sink of the nice a sink am tooling like add task and
year and what weve got in there is this giants which say men with her counter and at least to me is its a little hard
to reason about it is easy for test to influence one
another I think itd be better if the test were refactord such that
they more isolated from one another so that easier to introduce new ones new test so think that we should use um the ad
task yield promises mechanisms introduced over the years so I I suspect this will greatly improved
readability and it depends on that this work was originally done but such and such but has been split out so that a spit out for reviewersanity and also to make sure that if we
introduce and he norangeswe can be sure or we can have of
great certainty of where they were introduced either in big such and such or in her
during yfactorosubmid but filed okay so now srebase um it god where were those patches tom right here I had a hard to re because like all a branching and stuff I
got so many crazy branches I think this is at eight eight four five
o eight I am a four five thats the one okay so as she rebas am be for the base from the base of from of that to central I call cause diversion is oh I’m there some stuff based on it am rebas or yeah as you probably can see what I just
typed on because its too far down on the screen there a drag it up thats
what I tayamedthashacon on this in any event dispatchrom is changes yes I have remoteness day tavbromontus change we despatge its have omotnous change even on these old abe
alement after the remotnenceflipoccurs okay and there were some conflicts conflict
conflicts when attempting to merge that so its a during my big
testryfactorthebig conflict here lets take a look he may altenhisine sublime instead yeah I’m here yeah looks like some new tests were probably
at it I should take a look inside test form otto complete to her no actually I gather in a port the
reebase and I am just going to rebate be ah the part that makes us use the old
tree are these all richluosbox yes just this ten this yeah yeah and this yeah yes yeah yeah yeah so thats done I think now its tick a look okay thats update to the tip well build it and then well see where were at we
should have a a richlissba for audiclblypapupbut I suspect that
some tests will not be passing them we
have to make those test pass and in my experience
refactoring the tests I think I’m I should be okay trying to make them
pass and if I can well maybe what has
happened ive been as bugs so will find it gotcha old calls met yeah yeah building building building whihapbend I can’t do my large sweet glad to go in I am water l all die oh also I just realized I havent gotten
any all that we have our plus from erinclot for this staff what suite said I’m thanks he says I thank him you think are in clots thank
you sardeswengon I am away and um so thats gored and the ah we got her build here lets run this
we should have and otto complete pop up that like if go to the c b s I think ive got some
search complete history here of form
complete tree in the search field like me a
beadle breaking bad yet there we go so like
that that seems to work good so the question is huh is that how it as work I like oh a different behavior here I want to check that out yeah anrolar so um lets run a tests since he was broken ok components satan test test form out completestotht a we have a failure there yes I wonder what the deal is there oh and we had some failures leading up
to it okay so in test to a were on a figure whats
going on lets do that and test to a which is in here expecting papa protest one test fail at tom should be uflented
alcategood I think and then as unexpected fail okay is pop up shown for to starting test three hacking form in put god value one so what is this what we are failing
somewhere in here were gonna I mean it can have finished the test
like finish the whole test file whatever that part has done so it
just totedtat he wore oh yeah simple test finish after three see what happens here should fail is test yes we fail one test a checking for one got value on an expected value to
expect the forgery value to yeah um sowhat’s going on her um what selected at this point so lets
not return I I do that see what it does hi thing only value one is selected so we make sure the initial form is empty
we open the auto complete papa down we mature that we have on the tree
for I we check the first entry we go down we presseenterand’svallueon
okay we pass that and then what we do we restore the form we said to empty and
then he hid down again and down two more times and that is
supposed to do value to but we don’t we get
valueininsta thats interesting what we get rid of that that first
second down yes interesting thing is selected so there is your bug
great there that first down as being do keep down opens the the men ah tom pressing down to open the pop up don pressing down to open the
popupsowrdindtheseloggingair tom a pressing down to at the first item sure logan he then were going to attach the
debugger and see what is going on ha yeah so well whenever we are I think how works is wolet’sseewhere the problem might be but see if its at
the in the in the messaging like lets see if the parent is being
asked us like that first item but its
not doing it I’m so its log every time we are asked
like we say so by or has the work were where we say
select index mm tom a child is I’m to set index to index ari that for you see the what a typingdseifweinsolve this in the
next five and sir get a sense of where the problem
is at least on the oncall the episode
done a child is asked us a index to minus one thats interesting pressing down to open the papa
gonpressing open the pop up child is asked to set
indixtominus one yeah hmm that doesnt seem right ah ah and yet tom pressing down to a select the first I am um done pressing down to so the first item yeah pressingdalasliokedforsadonpressingoslik
e the first item and we don’t tell it we don’t tell them to slictanindexs thats interesting ah why is that while where is selecting next come from
um ive got too many these things open the
meceiefitanclosesomlesedown we get ready alas closed don’tsavedon it closes tony gose loses tony bad I the sole so as practingwidtombad thats just get rid of everything
actually onied any of these things don’t save don’t care okay so test form to complete we were here and we were also in browser content in
auto pat pop up we have implemented and as I
outohemply pop up with as this selected index value which I
thought would be sad um but its not being set it is so select by in us was being calling is as
reselectivinnexso lets see who calls a orally popup thats going to be our a
compleecontrolerythang mbeforemfurcontrolytoneof these two
things for fumclinformfthomcontrol form fill controller as out of complete
controller he attached to browser that not what we care about get pop up I think its gonna be out a complete
controllersat selected in back he sat selected in exteminus one if we handle the leaves I handled the lead here close pop up clear results when he set selected index to be something
else I see down the hanlekeenavigation if he down here we go it we get to see
for open if we are oh if so a okay okay you sure so maybe what we actually should be a
logging is my I was wrong before select by tom a child is asking to select by m and then how to do it so by reverse will be if its paid will be false and a page or page down a slip by something and then formoudicampletesslectbyis way um a parent on a complete poputollisonto and then we will say slept by um to complete donexalow and one is this for is only result not that one you I oudetlerich results at eight three four thirteen seventy
seven rich result so yeah rich result pop up now thirteen
seventy seven expects be e I do have and asked so a select by reverse a reverse and page a page lie faster oh man I thought was going to as solve
this mystery in time but I don’t think
its gonna happen presengdoslooke r same child as a select by
parantasedtaslikebyraversefallsand page
fallsdonpresonenslke I’m okay that work and then see
offordtesypressenanopventh of prsindownpresentouelike the first item
chhiledisasking the set index to is one thats what we don’t expect
thats what we do expect so why is the child
askingsetingdextomius one well good question I look like there are couple of places
where my as one was used a unsolifethecurrentit as if were in handling the lead in clothes pop up in the only way to know for sure is to
use mightebuger mm okay so what will do is on the second go of here I am need like a
debugbuildicthingoridon’tneed really a call matt thought sign now and call mat thought sign here and now I’m in a run the test so ah no out run yeah may process p id and aprosesis one of seven five eight o seven five eight is we all
attached to and the men a break a as math under rignerunthetestsandsomeasecond we care about okay in clear results told to clear the results because we set
the input we were told the stop controlling me and
put because we blurred or blaring it is an exact I have a feeling me I I I mean I need to
do the trick where I tosesatrom different machine because I
have a feeling and be bug from a
different machine because a fact that I’m using excoedhere his
changing focuses and having as no good so I detach and I’m afraid I
mean I stop the psodeiarfolksahyou may have
wanted to see me you that
debodingyoucan’t happen now I’m afraid I got a got a meeting
coming up but I am going to get into it and hopefully ah had some understanding
of what this test is faily for an
movevonerthenexton ah so lets go back to is to the gender what did we get done ah we actually did this and we ought
review plesfrmerinclotsso that’s good I explained how word and talk through it
a bit and then we fixed a are cases back and hours waiting on bill m we got
it to work with telantreet which is nice and now a
I’mstorry to I’m shifting focus to the to complete stuff and I am trying my
test pass there so the us a much for watching him so
seventy five of the Joy of Coding my
names might conly a if you enjoy epsodlet me know there is a
lingoneahteagendiinit’s all over the
place vidodiscriptionishshieling let me know
he thought it yet so ratdtheupbsoe I
read every you sent in I want to know what you
think I want to make the serious better
to let me know we want to see more of it I will do my best I have been adjusting
myself based on the feedback I received
so a keep setting that stuff in a really
apreciate it and with that I want to thank you again
for watching the Joy of Coding I hope
you have a fantastic weekend I will see next week. Bye bye, take care! See ya! Subtitles by the community

1 comment on “The Joy of Coding – Episode 75

Leave a Reply

Your email address will not be published. Required fields are marked *