Merken

Keynote - Day 2 Opening

Zitierlink des Filmsegments
Embed Code

Automatisierte Medienanalyse

Beta
Erkannte Entitäten
Sprachtranskript
and and and it Nokia no so I'm doing an experiment where I'm trying to see how much I can get away with before they stop inviting me these things is a so far I I have asked the you know if you follow me on Twitter you know what's about to happen but if you don't follow me on Twitter you're in for a treat I have asked the organizers to place security at the back door so you can't leave now and I will begin yeah I don't understand why people like static typing so much it's impossible for me to program without moving my hands it a good team of French computer scientists are working on a jet for Ruby they call it Le the 2nd version will be called to would it I recently went to JavaScript that all the node developers put me on edge that he did not have yet to the 1st thing you apparently action capable of all about streaming solider mediated contract and Netflix the problem of acting cable input is obtained for more channels than I watch it and I really excited about the new text browser the announced yesterday Turbo links and the words like that how much time you have a lot of it OK alright I will stop punishing you for a while and then all of a sudden get this skill started the of the start appears so it should should prepared and that so I will bind to the moon and OK it
I think we're up so you're probably wondering why I'm using Windows XP a and so
I'll I'll explain why I'm using Windows XP and the reason is because I can back is here at this conference is going to give a keynote in so like I'm a really huge fan of him back and I want to use the Wikipedia page and it turns out
that I can back invented xt so I I I I 5 you that's the for this presentation unfortunately a Windows XP has no mode unary like
these motifs that after lose the winning the so I'm sorry this presentation will lack of most it up anyway so welcome to health staff I really happy all year here and the all came to watch the I really enjoy going rails cause it's like if you attend rails caffeine get to meet a lot of the core team developers like me in most core comes Cyrill's cons and in the reason that you know the reason that most of us core team members have to come rails constant so that no we know what the next version of rails will have it again action cable so reminder about is that if you don't follow me on the Internet I intended love if you do not recognize me this is what I look
like on the internet the book just that's clear this is me in fact I thought
I thought I would say thanks everybody I I work for Red Hat so think you read out yes I'm using Windows sorry if I the high enjoy working around Adam among the mandate Eugene we write software that manages clouds so if you have a cloud we will manage it but of 1 of the things that resentful for having me here in having real staff are really happy to be here I I gotta say thank you to cover more people to of Eileen cos she wrote a letter code that the my presentation and you should see her yesterday if you didn't while he should have and also locally t he is going to be giving a presentation right after today and the first 1 of 4 stock so you should go see his talk he wrote reviews virtual machines so priority that there was a thank you all of you for coming in and I need to have cat photos the stock because that's what I do I back cats is 1 like cats this is Gorbachev Gorbachev puff often the worst of it this is my other cat had to to it and she helps me pair program a lot that is my keyword is very convenient however there I also brought stickers of my
cat so if if you like a figure of my cat comes say hello to me and I the reason I bring this conferences because I'm very shy person I don't know what to say to people that I know people don't know what to say to me so if you you know we have topic moment you can say again thicker and I'll just give you 1 so I've also been working a lot on doing an extreme programming and like brushing up on extreme programming in and the about putting on a new product that I've been testing out a whole for extreme programming I think like I think we need to do extreme programming lot more safely if they I think we're doing it to dangerously these days so I Iive this is what
I typically where as what I mean extreme programming could only get hurt of so last year last year gave
keynote last year I was a thought leader in training I just wanna like recap what happened the over over the past year while I actually graduated so the log and then you get because I got a degree in from online university unfortunately a after Irene my degree I found out that online university is not accredited university and that thought metering is not actual degree but I'm going to use my fathering presentation skills anyway so are you are you ready have had to reduce involuntary no OK they will buy I go get my my thought leader in face on the Ruby rails and technology rail computers the rails and synergy radial innovation rails future rails these are all words but I'm saying to you because I don't know what to do with an hour on the stand it here so that the it is the worst freeze it that I doubt what you were the anyway so I gotta do I got a decent rolling DHA to look like this is not like this what I really enjoyed doing like I want to want to read this and then like that and I thought anyway like I was really really hoping that this year there would be like a TDD is that they like last year to balance that was cooled to it and it's just before so I think this year like it wasn't it wasn't as extreme as the years I think like I'm just going to pay for him at the way that so with that it that is so it was really exciting to see that we announced a bowling 3 RDS and so also watching representation learning about the new features there's a supposedly coming in rails 5 thought myself I should
announce something I just something brand new like OK we're going to put this in a rail so you know in DGH talk a
lot about his backpack so users talking a lot about a backpack so I wanna note something today and I wanna note something that's a lot more light weight than backpack much more light like I wanted you I'm working on a lightweight framework scholarship inside of rails by employing actions me that it it only comes in 1 color thing do you but this talk about the effects of violent so I out about performance is I love performance that is what I love working on and I apologize for the early time I guess it is only 15 we're going to talk about some very technical staff of them maybe it'll be in rail side I don't know I'm not bound by your timelines and words it means that if I do what I want you fill up anyway right I wanna talk about other things that I'm thinking about and working on August start from the very very nebulous thing saying get more specific as we go through the presentation so we'll start out with stuff that I'm just thinking about and working on prove a concepts and so there is you know not much there is definitely not on a ship rails 5 well I can't say that for sure but I know I'm a talk about more nebulous stuff and get more specific but I have to admit light had a very very hard time of uh putting together this presentation this year because of last year I talked about like adequate record and that the work that I did on that in the work that I presented last year it took me like it took me 3 years to do all that work so my presentation last year was like the culmination of 3 years worth of work so as they're working on this presentation I like on my talk about this is going to pale in comparison to the speech I gave last year this is the flux of but I'm going to talk about the project so working on that I'm working on and I hope that we can presenter user can present users adequate developments in the future added it to the hopefully they will be fast enough so the 1st thing I wanna talk about is a automatic parallel testing something that I really want to have in future versions of rails maybe rails 5 I'm not sure in what what I mean what I mean by automatic parallel testing is that well just exactly that has to be able to run in parallel and to automatically so i want so that when you upgrades rails 5 new view rails test I will just run all your tasks in parallel in your tests will just automatically be faster and you don't need to do anything so this is that this is my dream and the way that were thinking about doing this is by having multiple test processes splitting your test of them into multiple test processes and we introduce I think real survival introduces a random randomized tests which will help help you run your tests in parallel eventually but the idea behind this is that will have and maybe 1 database with multiple test processes hitting a database so there's there's 2 ways that we can use this parallel testing we can have 1 database and multiple processors hitting the database or uni-modal multiple databases and this is 1 of the experiments that I was working on and the idea behind this is that well you know what our website runs in parallel we have multiple processes running and although the headings in database clearly we can do things parallel so why don't we have multiple test processes running against 1 single database and then just each test open the transaction roles everything back at the end that way we can get parallelisation and so I tried this out actually put together provide concept with this and found I can only get about old 15 per cent speed improvement on the Active Record test with this particular techniques I wasn't very happy with that and the other thing so the other thing that I'm looking at is doing multiple databases yeah now the idea behind this and there's already a lot of gems out there that do this and say OK where take a database is split into multiple multiple copies then just run a set of tests against each of those databases we can do in parallel but unfortunately the the solutions that are out there today a very manual you have to say like well I want this particular day know I need I need a set of n databases and do all the stuff I want to be completely automatic so this is the next thing that you test out and I said very nebulous I have not tested this particular technique yet but I think we can get much better parallelism parallelism out of this technique so the important things to me is that this has to be automatic I don't want anybody setting up anything to get it to work I have to be transparent so it should work I mean you should be able to upgrade all the test run in parallel enough and bring yeah so the next thing that I'm working on is catching compiled views now this is a little less nebulous we actually have some code that works with this what I'm talking about with catching compiled users you're actually using your Rails application so today we do lazy compilation so if you have or ERB templates the way that it works in rails today is where request comes in we get a walk and then we say hey is the table compiled if the template is compiled we unlock it if it is compiled than we compile a we save it into memory and then we online what I mean by compiling is taking that you're beer Hamel code and turning that into Ruby code so we take your temple co-trained Ruby code evaluate that Ruby code in cash so the problem with this particular set up that we have here is that this that this states that actually writes memory and the reason this starts is because if you're running a friend web server like him or whatever other threaded let web servers have to walk so you have this blocking bottleneck there now the other problem is this also bad for forking web servers because were wasting memory now this template compilation doesn't happen until after a request comes in so when you start the unicorn unicorn forks off however many processes you have in now every single 1 of those processes is compiling the same thing and storing it into memory there will be nice if we could compile all those on Bui dude in the master process and all the children processes will share that particular memory so we can save a lot of memory in that case now unfortunately there are a lot of challenges with this project and you talk about some of the challenges and how we're thinking about getting around them but similar challenges are like well I have too many templates read this as and and tell you this were a precompiled the templates as soon as you boot up obviously have been impacted boots speed was were compiling all the templates and maybe you have a website that has millions of templates but unfortunately you only use like 2 of them right so now compiling millions of templates and in fact were actually wasting memory because you normally would just use 2 of those millions templates I would say you need to do it this templates but is but we should probably have something that you can configure and say I only want these particular samples to be precompiled now the other that that's not so much a challenge we can do that you know I'm not a big deal configuration you know configuration thing the fall compile everything otherwise you can say I only want these particular ones compiled in advance now this is not this is not a very big challenge the biggest challenge in my opinion is rendering with locals when you do render template news locals you get about half were actually happens under the hood you go look at the where the temple rendering engine works as you'll
see it looks a little bit like this where we say OK if I were going to put a prelude above your compiled templates we take your template converted into Ruby code and we make this little prelude based on that patch of locals that you past in where the prelude set local variables equal to some particular value from the hatch now unfortunately this is dynamic and we can only know the runtime we only knows information as soon as you as soon as that render call happen right which means we have to do a lazily now what we're thinking and doing is looking at the source of the Templeton trying to determine what locals you actually use so maybe we can come up with heuristics we can definitely come up with heuristics for templates that can have locals I but maybe we can come up with heuristics for ones that do have locals in only precompile sets that we know so this is 1 of our this is 1 of our of challenges in I'm not telling you don't use locals please use locals the police really so this is 1 of the biggest is the biggest challenge we have a and yes it's still a little bit nebulous we do actually have code for this up on get so the next thing I want of about
integration tests the figure looking in integration transfer knowledge signal get control has 1st before the control tests OK this is the
control test that you get doing research and reduction look at yeah everybody's millions of great but will get an integration test now get you get service and we're done so control that immigration tests controlled tests all of our programmer brain they're going in these look very similar so I thought to myself as like why you know why do we write
controller tests why why the only reason I can come up with is well integrated has to slow the only thing the only reason I could come up with what's interesting is if we look at the these integration and controller tests were testing at different levels but nothing about these tests says what assertions we can can make about these right anyway so we right we're I controlled test because integrated has or small so something didn't make sense to me about this that I just kept thinking about it I'm like well you know if integration tests slow does that mean that our website is slow to convey integration tests and in you know this something that makes sense if the application is fast enough to be serving up request wiser too slow to be writing integration test so this is not make sense to me the sofa rails 5 is left the question mark but I wanna have faster integration tests so we've been working a lot on doing Implementing faster integration test so if we think about control attested integration says what's the difference between those 2 controller tests have high Anatolia the difference between them and this is at the framework level ifyou go look at the difference between them the main difference is that control has had no middleware so when new testing a controller you're not going through any of the middleware in your application where integration tested do have middleware but these are really the only differences between the 2 integration test goes to the middle ware and hit the router control has to not protesting directly against the controller so what I wanna do is I want to do the controller tests I just want to leave them just go well OK that's OK you need a lot of time by and I don't mean if delete manure you're you're upgrading go 0 my god my control test don't work if you can book that at that that is what I wanna do is actually just wanted to leave the controller testing framework and implemented in terms of the integration testing framework so that when you operate when you upgrade everything the work the same it's just that we only have an integration test framework under the hood right so in order to do this in order to do this we need to figure out why the user integration test so slow so why the flow firstly to know how slow they are so the 1st thing we did and that it by we I mean I lean back the fact that at at the at the GUI for goat I do the bridge they laughed at that in anyway so that the benchmark looks like
work now we're doing it we're doing a benchmark of this is the top 1 is a benchmark against an integrated as the other 1 is a control has more testing exactly the same thing would testing index so the top 1 immigration by looking for test and we compare the 2 and the thing is I don't actually care how fast either 1 of them are I only care how fast they are with comparison to each other right because you wanna make sure the integration tasks are just as fast If control has been told us who can so when we ran
this we found while we did a comparison it it was 2 . 4 times slower immigration test for 2 . 4 times lower than in the control test
so we need to know what is slow why is it so slow yeah In in order figure that we use a gem called that profit is built on profiling stuff that's inside of Rimini equally you will be talking about later sure but we use a gem called stack profit is the task that we did we that OK when
run where run 1 method against controller test and I wanna know what the bottlenecks are in the controller tests and I'm gonna compare those the bottlenecks in the integration tests and see what the differences so if I can see what the bottleneck differences are maybe I can understand what the what it is about integration tests and makes them so much slower than controlled so we have a controller test were doing a CPU profile on that which means that we're timing how long the code spends on the CPU and we'll talk about that a little bit and then we dump out the profile results in this particular file so I wanna talk a little bit about CPU
time versus wall time we can figure this uh test to use CPU time what CPU time means is like well I only wanna know about time of my code is spending on the CPU so to give you a concrete example of what this means is like well this sleep command is slow but it doesn't use CPU right so if you said sleep for 10 seconds your program is going to be slow the takeaways send seconds but that's not gonna show up on a CPU profiles you won't see things like sleep you want things like I O so that OK review this
factor and dump out this fact is I don't publish that this faculty like this we ran it really excited because if you look at the top of 53 % of our time was being spent
in the test inside this method in like wow OK amazing so we can if we fix the or code is going to be 53 per twice as fast or whatever some number it's early cut the time enough I don't know little boy bias so how do we make this method
faster I'm a show you my number 1 favorite technique for making our method faster because my number 1 favorite technique was to delete it
and if so it's a to this you OK with 2
field beyond you just the we all active so rewrite rerun the benchmarks look at the results and the OK boom that is no longer in our profile 50 % after
I'm extremely happy I yes Winding's the worst man it by the time the process and this is the before
time it took about 12 seconds and then this is that after time it also took about 12 step here you will note but this is not 50 cent is so was that about this
but if something is we know that this tacit CPU-bound were not were not doing any it we're not doing anything or not doing any slaves for not doing any I O calls what is going on here so if we change the profile is say it if we change the profile to wall time rather than CPU time we should be seeing the same stack wall should be similar to CPU in this particular case because we're CPU-bound not graph I over so we rerun it but this is the this is
the CPU's fact if you compare it to the wall fact you'll see that they are completely different maybe not completely when you look again I completely different yes they're totally different but which is now we expected so I highly contact in Amman who wrote the profile and so on I was like a about a CPU-bound test here when I do wall profile versus the CPU profiles totally different and he said well is folly bug in your code and I so and I showed him and I was like it's really weird he's like yeah that is weird and I said can you fix anything now I have no idea the so then I contacted Kouichi about because the stack profiler uses rubies tools under the hood for doing this stuff and I said hey I collegiate at this task and it looks weird the result of very weird to me I can you take a look at you will say like I others are weird and highlight of my so give it so you run the test on here as a test on Linux is like I'm not getting the same numbers as you then runs on and gets the same number as it turns out that it seems like there's a bug being trapped only on all OS 10 the so there is a bug
the and we don't know what it is it's so the point that I'm trying to make here is that even profilers have blogs so you need to verify the test results that you're getting now unfortunately but we walked through all this stuff we're talking about getting things faster improving the making speed improvements and we made no speed improvement so I have wasted the last 10 minutes of your time I am very sorry that is thought you something useful was do something useful with do integrated has profile and this I will only be using Walter so we look at we look at the profile of integration tests if we give as fast as controlled
has the worst that would like for wall it turned out that we're spending 27 % of our time calling delegates so delegate calling delegate was slow so
we rewrote it a little bit we rewrote our implementation to stop calling delegate this is the
patch that we applied in this is actually this is fairly old but we made this change few months ago and they're all the other caveats about this which you should come talk to me about astute readers will notice the issues but this is this better so terror progress
before we're 2 . 4 7 times slower right again checker
comparison we're now down to 1 .
4 5 times slower if every runtime
against our stuff will see before with 26 seconds in our down to 16th so we made some improvements but so even profiles have blogs
to check this and I don't use just 1 profile a check your number is always measured always know code they're working on and verify the results that you have come up with was something else so this color this project we did is about a few months old today integration tests are approximately 10 % lower than in control test and we've actually improve the speed of ball control a test and integration tests such that when we ship rails 5 if we delete the the controller testing framework the integration tests will be faster than the controller tests were in the previous version yeah so our goal is to make sure that if we did deliver controller test they had to be at least as fast as the previous version so should be faster faster than control it has some previous versions and thank you don't thank me think that we the fact that that that that is the time it so the next thing I wanna talk a little bit about is that's performance the I don't even know this stupid phrase means so what what I mean by this is um I want to know as a as a rails core team member I want to know what is the performance of rails but I don't wanna know just from inside the framework I wanna know as soon as I hit it there what is it doing how fast going can we make that fast now in order to study this in our study the performance that had a study bundler it because very frequently my my command bundle that bottle exact whatever right on in order to study but I need to study bins stubs and what I mean by been stubs since this is extremely confusing I'm not talking about the stuff that you store in being in the rails I'm not talking about bundlers been style of I'm talking about the bins that RubyGems installs so when you install a jam on your system I that bundle command is actually generated by a regions when you install Butler as the you're not actually running the Bundler been file that ships with bond the Bundler gem you running a been which in turn calls upon the bin file so if we look at the base of
source code off like this is the this is the been some source code so I need to study this you'll notice that we
have this germline that jam in there so I need study jam in order to study jam miles
study required regret so the question is what does gender at it and because he is I gave a talk I gave a talk at the the aid conference called Cusack C U S ECE Canadian universities offer engineers in Canada it's is a conference that was all for a canadian university students so the conference put on by university students for university students and of course and the ponds about John Cusack right so I have here the the the the surface that it so I'm like tons of references to his movies and stuff you know they're all in his movies and I have I have everybody I'm like OK to raise your hands if you're over 35 to it it is telling that I also that that that if this is the anyway so what the gem you you would have yeah method due the GEM method finds the gem
spec find the gems stuck with a particular name and then a puts that gem step onto the world but under load about so does load path manipulation it we can see that like you could do people acquire B
and today so this is an example were loading the bumbler jam and so if you look at is duping load have loading above of above the dominant checking load that afterward so you'll see that there's a new hat on I on the look lookout so OK we know about that
now what happens when a file is required is another interesting thing we need to know about I wanna file is required it does require and this is so confusing religions has its own require which is different from Ruby's require an I'm talking about the required it's built into regions when you write your Ruby because you probably don't know which 1 you using and it depends on the situation if you using Butler using Ruby's require but if you just writing a regular old Ruby script using Ruby's require which is Superfund figure out and fun for new people to understand and I'm going to talk about Ruby gems is required is the 1 that is inside of religion what is it to you and
says OK if the files in the load path then we loaded if it is not in load path and we look forward to gems back and then we had a gene's vector load path and then we will define make sense OK good he and love these PowerPoint transition the work so often right so I wanna study regions
performance we'll talk a little bit about my test methodology here test methodology is I wanted to require 1 file and then you increase the number of genomes around on the system so require 1 file and then see like increase add more and more genomes our system and see what the performances of require as we increase number gems I also want to do the same thing with activating gem so as they like the gem command we add 1 jam or we were activate 1 genome and then request that increase number gems the on the on the system so same test now I started testing those animals show you show your graph from men as I was testing it I found that the time was linear so we expect in our we I following year growth was testing of so the x axis is the number of genomes the on the file system installed in the Y axis is the time in seconds all these gender generated I generate all these gems they all contain 1 file in all the genomes have no dependencies now what was interesting is since we found that it was linear Tyrus's I found that it was linear time and meant that Ruby RubyGems was probably looking through an array right probably trying to find something in array which be when your time and so what I did was I found array that was searching through and what this graph that you're looking at this graph represents the best and worst case scenarios so the pink line is if the file was at the very beginning of the of the list and the green line is is is if the files the the end of the list so probably when you're doing a acquiring you're gonna land somewhere in between these 2 1 so this is how long it took to require 1 file now also look at the allocations require 1 file so this as your what the object allocations look like this is the ball linear growth exactly the same thing like the same task just half a memory-allocation so that the best and worst case scenarios and I think it's pretty interesting you can see the the slope here is much different than the slope on the time and I think that says something about our garbage collector that are garbage collector is good and so that I want to look at time to activate 1 gems was to be doing this gem bomber 1st whatever right so I tried the same thing as solitaire was linear time like show me the best and the worst on it turned out there exactly the same exactly the same growth so then I looked at allocations per genome and of all the other 1 line here also linear growth and I only put 1 line because they're exactly as look at so you got require performance that jam performance so now let's
take a look at bomber performance yeah OK so my test methodology for this and I'm much more familiar with the region's go the mammal to bomb the growth so I I don't know why I can explain to you any of these numbers I can exploit my test methodology but I can't tell you why these numbers are the way they are so we have the test methodology here is that 1 gender the GEM file and I increase the number of gyms there on the file system that ousted another test source said OK I want to increase the number of gems the gem file but keep a constant number of gems on the file system now remember as I said earlier all these gems have no dependencies all these terms are local to my machines are not getting the network in any of these so if we look at varying the number of system gems where we only have 1 gender GEM file
will see we have linear growth during bundle up to so again x axis is number of general system Y axis time in seconds and then if we look a bundle exact exactly the same thing just different times both linear growth so I kind of expected this sense of Ruby regions under the hood with linear growth and we're linearly increasing the gems on the system so this is not surprising to me the next thing I did was I varied the number of gems in the GEM file so I said OK let's keep a constant number of them on system with increased number of gender in the GEM file and look at the performance as we increase those gems and I have extremely good news for you the good news is that the time for bundle exact if you run bundle that it is actually a constant times so this is we're seeing a lot of noise in here but it's actually about the same time between each run all the way up to a thousand gems system so that's very good unfortunately that time is like 1 over a 2nd is not good we like to get that smaller and what I think is interesting is if you time but what I found was that bond loading all the gem specs on on your system so I found that loading those gems that if we did a breakdown just timed loading all the gene's facts we see
loading all those gems specs talk about 710 ms and we're spending another 750 ms doing I don't know what but the good news is that it's constant it doesn't grow so all we have to do is we find that find that all the stuff probably reduce that and see if we can find a way to reduce speculative will have constant growth that's smaller now the next test I ran was OK I wanted you and growing the number of gems in the system and I wanna unbundle update this is the 1 that actually surprised me the most this is what it looks like
when you run bundle update and you increase the number of genomes on your inside a gem 5 so X axis is the number of gems the gem file y axis is time in seconds now when I was 1st running this and I was doing I wanted test with generations of thousand and 10 thousand and and then 100 thousand that was my plan to just do those those numbers and see how group now unfortunately when I ran against 10 thousand I was sitting there for hours yeah the furnaces on my Tweets but was waiting and waiting and waiting and then finish so I decided OK what's is going 100 100 gem increments of 2 thousand and now I wanna say OK we don't occur fit here we see that is polynomial time How long would 10 thousand Jim state we can calculate this so if I compare with plug in the numbers to this equation plug it in of the time came out something I did not believe so I said OK I don't believe that number of let's take you know 200 plug it into the equation and make sure that that 200 matches the point on this graph it did not this equation is wrong but I it makes itself
and so I was doing I was
right hand by the 1 OK but but I'm really sorry if you this stupid bears and I'm sorry on would say thank you
and call them I hope I can who hold
in a room where they quickly noted that a black screen we used
OK OK but like planted came back and then this is the worst I couldn't take it OK OK but when you get to slide although on what I a
shade sorry hit the back there code here alright so how it makes even more nervous than psychotic so right so that equation was wrong in the numbers were not the numbers were not correct so what I did was I assigned OK it is time to pull out the big guns let's use all are our so I had all the this is this is using ah this is the R code used to fit that curve I'm reading in all the code for all the times from CSV file from the 1st 1 the 2nd line were doing um a regression against a polynomial that's a 2nd order polynomial at the number 2 means there in the poly poly function and then we plot those points the points that I got from the CSV file and then that last line is writing a is plotting the actual equations so we're gonna get a bunch of points and then we're gonna see a a red line that is a graph plotting equation and that's what this looks like so this is
this is the graph that comes out of r of the considers circles the circles of actual data points in the red line is the equation and and I have to offer the coefficients
and we get the coefficients for each of each part of the equation and then check the or squared to see how close we fit that curve in the R square is point 9 9 8 so it's very good and this is
the so this is the real equation thank you powerpoint I could not change the font or color so anyway that is the equation I and this is the correct equation so what I did is I plug this in R I said
OK let's define and was define a function where the the code up there is just basically taking the coefficients from that and prediction and then just doing multiplication so if we run this in check anti GM file are anti file take about 11 seconds which I thought was interesting In the thousand and installed a your system you GEM files and the in run bundle update it takes 11 seconds but now if you have a 10 thousand a djembefola has 10 thousand gems and remember I couldn't finish this I want to know how long maybe wouldn't have taken would have taken about 6 thousand 800 seconds or so not so I'm up here on state talking about performance of complaining about it seeing that it takes forever and I don't like doing that I don't wanna get up here in the article boohoo gerbil links of the words and he I wanna
talk about effects of like what we doing for right and those who can't wait it's nice it's nice that we can see the stuff it's good that we can see how to how to model these things how to get these numbers but really what really matters is like OK how we fix it when we do moving forward right so if we take a look at all the stuff that we've been doing like activating Germans going to the gym filed a lot if we look at it and think about the information that's there like with look at this code and think well what do we know if look at these different things look at themselves will look at GM filed or locking just think about what is the information that we have so if we
look in the business some source code will see the information we have is we have that we have an m farming and now in GEM
filed a lock we look at the Jet the locked file see we have the need and the version of the gem follow we care about yeah so if you go in the Ruby gems today you'll find some code that looks like this and
this is this is not actually the code this is just a condensed down in field you're version essentially what it does is it says OK under load of all of the gene's backs off of your file system and a look through all of them for 1 has this particular names bond whatever where we look for so this is where a linear growth is coming from at loading all those gems facts and trying to find the 1 that has that name so we say like OK I wanna know no 1 of the right let's let's look at the impact of this if we had a hundred thousand genes on a file system while 100 thousand 1 I will have a hundred thousand genomes + Bundler we do that how long this bundle that should the take the same so my machine at 100 thousand 1 Jens on are unbundled that'd it takes 50 seconds to do that which I think is pretty ridiculous still long so what that what I did is I said you know this doesn't make sense we shouldn't load all the stacks we know we only need the bomb spec it says it in the code right there it says gem bomber 1 loading all so what I did was I change the code to be like this with a very stupid very dumb changes like OK instead of getting all the germs that's why don't I get the ones that just start with bumbler get that the revolutionary idea that walk I he so if I do that and right again were down to 600 ms so 50 seconds down to the final section few I think the think now unfortunately that code that I just showed you still still all
and still linear time but it's just that the slope of this is much smaller than the 0 slow but I think I think we can actually make it all 1 time and the way we can do that is we say well for the for the Bundler case the public case knows the knows the gems fact name and also knows exactly the version this suggests that the inn and the version and from that we can actually calculate the file name so you can say OK which to calculate calculate the filing for that we load that specific 1 now the Ruby gems jamming version it doesn't know the exact version just once the latest so that when we may still have to do a search for however I think we can make even that 1 so and the way that we would do that is say well when you install the jam we can keep a manifest of all the terms that are on your system so when you put up a load that below that manifest and just say OK you want you know gems with whatever name give me the 1st for the been subcase will say gems said do tell me all the specs with that name into the new the first one because we can presorted on install so we don't even do that for the border cases now there's other future work that I wanna talk about a little bit and that is making require constant time I think that we can make a wire constant time to if were keeping caches and install so this is this is very nebulous I'm sorry we've gone full circle from nebulous the concrete and now I'll just some ideas that I'm thinking about but I think that we can make require time constant time to in the way we way we and thinking about doing that is saying OK when you install a gem Wernicke the manifest of all files the inside of that GM and then keep another manifest of all the genomes with files so you do require in a file we can just do look up there and then require that file now it is several times the sine of when you do require and you actually send that Ruby so rubies require case suddenly slides for this will just talk about it In the case of Ruby's requires so say you're require through end RubyGems is not involved at all it's still linear time grows and the reason it's linear time growth is because I have to search through the load that has the say OK is a here no here no here no keep going through all those who was very very interesting is that if you give require an entire file path from the root of your file system it won't do that search will just below that file so don't even do search at all so I've been thinking about is when you do a gem install if we have that manifest when you do require we could look up the full path from that required just send out after Ruiz require not ever search low death so I think we get a lot faster a lot better performance there but unfortunately I need to get through this so I need to finish up this uh step caching work 1st before we can experiment with that anyway so my throat is starting her we should finish this up what I wanna leave you with today what I want you to remember hopefully remember from afar it the main things that are annoying me about the performance of the performance of regions in the performance of bundler is that all this stuff is static data we know all this data in advance we know all of it it's all there yet we're recalculating it at runtime that really really bothers me just down at my program chorus like I know this data why are we doing this quite error if I sit there might consider my desk the math molecular the at the at the captive's here so if it if you have data and you know it's that calculator you don't need to do that just use the static data use what there taking measurements take the measured taking measurements of the things you using now I would've known I would have totally expected that that bundle up the case would be linear growth all the stuff that we're looking at previously would be linear growth and this 1 was not so I was very surprised you should take take measurement of all those things you can understand what's going on your system you should also be question your intuition now I thought for sure my intuition was that that would be linear time it was not it turned out I was wrong also it turns out that maybe that particular algorithm after speaking to speaking to some of the Bollettino that made algorithm has to be polynomial time in at my intuition is is wrong maybe I'm wrong so you need to talk to the other people were involved with that particular code the your test so the last thing is I have stickers user comes lot to me if you wanna ask a questions about any of this stuff I am happy to talk about it so I don't actually have long hair with all my thinkers look like in the sense that thank you very much hair and move in the in the and and
Schnelltaste
Stereometrie
Selbst organisierendes System
Browser
Computersicherheit
Güte der Anpassung
Versionsverwaltung
Turbo-Code
Ein-Ausgabe
Binder <Informatik>
Design by Contract
Hydrostatik
Knotenmenge
Twitter <Softwareplattform>
Datentyp
Wort <Informatik>
Optimierung
Softwareentwickler
Informatik
Disjunktive Normalform
Physikalischer Effekt
Fächer <Mathematik>
Stab
Gruppenoperation
Bildschirmfenster
Versionsverwaltung
Motiv <Mathematik>
Speicherabzug
Softwareentwickler
Kombinatorische Gruppentheorie
Internetworking
Homepage
Virtuelle Maschine
Software
Digitale Photographie
Stab
Optimierung
Kombinatorische Gruppentheorie
Computerunterstützte Übersetzung
Code
Streuungsdiagramm
Internetworking
Extreme programming
Momentenproblem
Biprodukt
Computerunterstützte Übersetzung
Extreme programming
Figurierte Zahl
Serviceorientierte Architektur
Wellenpaket
Minimalgrad
Verschlingung
Selbstrepräsentation
Meter
Gefrieren
Minimalgrad
Computer
Wort <Informatik>
Computerunterstütztes Verfahren
Kombinatorische Gruppentheorie
Gleitendes Mittel
Grundraum
Bit
Prozess <Physik>
Compiler
Versionsverwaltung
Kartesische Koordinaten
Template
Eins
Softwaretest
Volumenvisualisierung
Parallele Schnittstelle
Ereignisdatenanalyse
Softwaretest
Sichtenkonzept
Template
Datenhaltung
Heuristik
Stellenring
Systemaufruf
Quellcode
Rendering
Transaktionsverwaltung
Menge
Festspeicher
Heegaard-Zerlegung
Server
Projektive Ebene
Information
Tabelle <Informatik>
Aggregatzustand
Server
Web Site
Gewicht <Mathematik>
Stab
Gruppenoperation
Fluss <Mathematik>
Sprachsynthese
Kombinatorische Gruppentheorie
Framework <Informatik>
Code
Task
Open Source
Multiplikation
Benutzerbeteiligung
Datensatz
Variable
Stichprobenumfang
Thread
Coprozessor
Softwareentwickler
Konfigurationsraum
Schreib-Lese-Kopf
Booten
Rechenzeit
Paarvergleich
Patch <Software>
Ruhmasse
Wort <Informatik>
Kantenfärbung
Compiler
Softwaretest
Programmiergerät
Softwaretest
Desintegration <Mathematik>
Gamecontroller
Gamecontroller
Wärmeübergang
Figurierte Zahl
Ordnungsreduktion
Integral
Web Site
Subtraktion
Desintegration <Mathematik>
Kartesische Koordinaten
Bridge <Kommunikationstechnik>
Term
Framework <Informatik>
Computeranimation
Übergang
Task
Softwaretest
Gamecontroller
Router
Benchmark
Softwaretest
Paarvergleich
Indexberechnung
Benchmark
Web Site
Paarvergleich
Lineares Funktional
Datenfluss
Integral
Middleware
Rechter Winkel
Automatische Indexierung
Grundsätze ordnungsmäßiger Datenverarbeitung
Gamecontroller
Benutzerführung
Ordnung <Mathematik>
Softwaretest
Resultante
Bit
Subtraktion
Desintegration <Mathematik>
Indexberechnung
Paarvergleich
Profil <Aerodynamik>
Paarvergleich
Lineares Funktional
Elektronische Publikation
Zentraleinheit
Code
Computeranimation
Integral
Task
Softwaretest
Gamecontroller
Speicherabzug
Gamecontroller
Ordnung <Mathematik>
Figurierte Zahl
Softwaretest
Zwei
Fakultät <Mathematik>
Stichprobe
Profil <Aerodynamik>
Zentraleinheit
Sichtenkonzept
Code
Computeranimation
Keller <Informatik>
Rahmenproblem
ATM
Total <Mathematik>
Speicherabzug
Optimierung
Bitrate
Zentraleinheit
Softwaretest
Zahlenbereich
Schnitt <Graphentheorie>
Code
Computeranimation
Gruppenoperation
Resultante
Prozess <Physik>
Prozess <Informatik>
Graph
Baum <Mathematik>
Zwei
Stichprobe
Gewichtete Summe
Profil <Aerodynamik>
Benchmark
Zentraleinheit
Ähnlichkeitsgeometrie
Computeranimation
Gruppenoperation
Rahmenproblem
Datenfeld
ATM
Bitrate
Zentraleinheit
Benchmark
Metropolitan area network
Softwaretest
Resultante
Punkt
Web log
Desintegration <Mathematik>
Stichprobe
Profil <Aerodynamik>
Zahlenbereich
Zentraleinheit
Code
Computeranimation
Keller <Informatik>
Programmfehler
Integral
Task
Rahmenproblem
ATM
Total <Mathematik>
Gotcha <Informatik>
Bitrate
Bit
Konfiguration <Informatik>
Desintegration <Mathematik>
Mathematisierung
Stichprobe
Indexberechnung
Implementierung
Rechenzeit
Patch <Software>
Paarvergleich
Lineares Funktional
Rechenbuch
Systemaufruf
Computeranimation
Keller <Informatik>
Wurm <Informatik>
Patch <Software>
Rahmenproblem
Softwaretest
Arithmetische Folge
Rechter Winkel
ATM
Total <Mathematik>
Bitrate
Resultante
Bit
Web log
Versionsverwaltung
Programmverifikation
Zahlenbereich
Code
Framework <Informatik>
Computeranimation
Softwaretest
Gamecontroller
Binärdaten
Installation <Informatik>
Softwaretest
Beobachtungsstudie
Zwei
Profil <Aerodynamik>
Physikalisches System
Elektronische Publikation
Dialekt
Integral
Gamecontroller
Projektive Ebene
Speicherabzug
Kantenfärbung
Ordnung <Mathematik>
Versionsverwaltung
Faserbündel
Faserbündel
Beobachtungsstudie
Open Source
Quellcode
Elektronische Publikation
Flächentheorie
Code
t-Test
Quellcode
Ordnung <Mathematik>
Versionsverwaltung
Grundraum
Computeranimation
Last
Elektronische Publikation
Regulärer Graph
Last
Skript <Programm>
Elektronische Publikation
Versionsverwaltung
Figurierte Zahl
Dialekt
Computeranimation
Betriebsmittelverwaltung
Bit
Gruppenoperation
Zahlenbereich
Kartesische Koordinaten
Solitärspiel
Computeranimation
Task
Last
Zoom
Dateiverwaltung
Betriebsmittelverwaltung
Gerade
Beobachtungsstudie
Softwaretest
Elektronische Publikation
Graph
Zwei
Mailing-Liste
Vektorraum
Physikalisches System
Elektronische Publikation
Dialekt
Linearisierung
Objekt <Kategorie>
Last
Geschlecht <Mathematik>
Rechter Winkel
Speicherbereinigung
Faserbündel
Softwaretest
Datennetz
Zwei
Geräusch
Zahlenbereich
Quellcode
Physikalisches System
Elektronische Publikation
Term
Dialekt
Computeranimation
Linearisierung
Konstante
Physikalisches System
Virtuelle Maschine
Geschlecht <Mathematik>
Konstante
Dateiverwaltung
Faserbündel
Faserbündel
Softwaretest
Punkt
Graph
Zwei
Gruppenkeim
Automatische Handlungsplanung
Zahlenbereich
Gleichungssystem
Physikalisches System
Elektronische Publikation
Computeranimation
Last
Generator <Informatik>
Twitter <Softwareplattform>
Fitnessfunktion
Aggregatzustand
Computeranimation
Touchscreen
Lineares Funktional
Kreisfläche
Punkt
Graph
Zahlenbereich
Gleichungssystem
Elektronische Publikation
Polygon
Code
Computeranimation
Rahmenproblem
Polynom
Code
Koeffizient
Lineare Regression
Ordnung <Mathematik>
Kurvenanpassung
Gerade
Lesen <Datenverarbeitung>
Punkt
Gleichungssystem
Code
Computeranimation
Multiplikation
Prognoseverfahren
Font
Koeffizient
Code
Bestimmtheitsmaß
COTS
Kurvenanpassung
Lineares Funktional
Strahlensätze
Zwei
Datenmodell
Prognostik
Physikalisches System
Elektronische Publikation
Binder <Informatik>
Funktion <Mathematik>
Koeffizient
Mereologie
Wort <Informatik>
Kantenfärbung
Faserbündel
Aggregatzustand
Soundverarbeitung
Faserbündel
Elektronische Publikation
Installation <Informatik>
Zahlenbereich
Quellcode
Computeranimation
Quellcode
Rechter Winkel
Einheit <Mathematik>
Code
Information
Versionsverwaltung
Kartesische Koordinaten
Faserbündel
Kondensation <Mathematik>
Zwei
Versionsverwaltung
Systemplattform
Keller <Informatik>
Elektronische Publikation
Code
Computeranimation
Eins
Virtuelle Maschine
Datenfeld
Last
Code
Dateiverwaltung
Verbandstheorie
Garbentheorie
Versionsverwaltung
Faserbündel
Softwaretest
Sinusfunktion
Bit
Mathematisierung
Versionsverwaltung
Rechenzeit
Physikalisches System
Rechnen
Elektronische Publikation
Term
Dialekt
Code
Linearisierung
Konstante
Algorithmus
Last
Dateiverwaltung
Installation <Informatik>
Wurzel <Mathematik>
Optimierung
Ganze Funktion
Einflussgröße
Faserbündel
Fehlermeldung

Metadaten

Formale Metadaten

Titel Keynote - Day 2 Opening
Serientitel RailsConf 2015
Teil 36
Anzahl der Teile 94
Autor Patterson, Aaron
Lizenz CC-Namensnennung - Weitergabe unter gleichen Bedingungen 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen und nicht-kommerziellen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen und das Werk bzw. diesen Inhalt auch in veränderter Form nur unter den Bedingungen dieser Lizenz weitergeben.
DOI 10.5446/30677
Herausgeber Confreaks, LLC
Erscheinungsjahr 2015
Sprache Englisch

Inhaltliche Metadaten

Fachgebiet Informatik

Ähnliche Filme

Loading...