[00:00:01] [music] [00:00:06] >> Thanks Manny and hi everyone. Um thanks [00:00:08] for joining us today. Uh my name is [00:00:09] Drew. [00:00:10] >> I'm Jake. [00:00:11] >> Emmanuel. [00:00:12] >> And for the this year basically we've [00:00:14] been working on uh version 11 of C Sharp [00:00:17] Dev Kit um [00:00:19] and it's not really an incremental [00:00:20] update. We've rewritten [00:00:23] almost all of it. It's a completely new [00:00:25] architecture, a completely new approach. [00:00:27] And um as we've gone through that [00:00:28] journey we've found that [00:00:31] those ideas are actually more broadly [00:00:32] applicable than even in just C Sharp [00:00:35] IDE. So just like the last question you [00:00:37] know wherever you're using your tools [00:00:39] there's a chance that what we're working [00:00:40] on and the direction we're going in will [00:00:42] help out um uh [00:00:44] to make you more productive, make your [00:00:46] tools feel better and if you're using [00:00:48] agents work better with agents on a [00:00:50] machine where you tend to now have more [00:00:51] copies of these things running at the [00:00:52] same time. [00:00:54] So I think Jake is going to take us [00:00:55] through a little bit of this journey [00:00:57] from the uh the start of it. [00:00:59] >> I will. [00:01:00] So about 9 months ago uh a team reached [00:01:03] out to us and they just kept telling us [00:01:04] that VS Code and C Sharp Dev Kit and C [00:01:06] Sharp extensions were were terrible uh [00:01:09] and we we couldn't figure out what was [00:01:11] happening. Like they kept giving us the [00:01:13] feedback and [00:01:15] we we got dumps from them. We did all of [00:01:17] our usual diagnoses and it we couldn't [00:01:20] quite figure it out um and so you know [00:01:23] eventually you know their VP escalated [00:01:25] said it was terrible and uh [00:01:28] said everything was sort of you know [00:01:29] crashing on their machine. [00:01:30] Uh and so we were like [00:01:33] what are we missing right? Like we we [00:01:34] checked out the repo, we tried it on our [00:01:36] machines. They could build, they could [00:01:38] test, they could run their applications. [00:01:39] It seems like everything was working [00:01:41] exactly as we expected it to. And so my [00:01:44] manager was like just go over there. Go [00:01:46] over there, go figure out what they're [00:01:47] doing and why it's not working and [00:01:48] what's happening. And so I go over there [00:01:51] and it was immediately obvious what was [00:01:53] happening. Uh so they were you know kind [00:01:56] of like some of the other talks here [00:01:57] mentioning they had already [00:01:58] transitioned. They had already switched [00:01:59] away from VS Code being their primary [00:02:01] experience. They were they're spinning [00:02:03] up tons of agents, 5, 10, 15, all of [00:02:06] them solving GitHub issues. They had uh [00:02:08] Mac machines, I guess sort of before it [00:02:09] was cool and had, you know, 256 gigs of [00:02:11] RAM and they were burning through all of [00:02:14] it. And so we looked at and what was [00:02:16] happening is they had hundreds and [00:02:17] hundreds of MS build workers. Each one [00:02:19] of those agents was kicking off builds, [00:02:21] running tests, all of that, and all of [00:02:23] their memory was being consumed by .NET [00:02:26] tools being run. And so it wasn't really [00:02:28] that C# Dev Kit and the experiences in [00:02:30] VS Code were terrible. It was that there [00:02:33] was no resources available on their [00:02:35] machine to do VS Code, to do Teams, to [00:02:37] do Chrome, to do anything on their [00:02:39] machine. It was just completely bogged [00:02:41] down. Um and so I ended up jumping in [00:02:43] and doing an experiment. Uh I built out [00:02:46] a build queue [00:02:47] and it basically just took, you know, we [00:02:49] had designed this for one user. And so [00:02:50] my my naive attempt at this was [00:02:52] basically just take all builds, [00:02:54] intercept them, and run them serially [00:02:56] and see if the experience sort of fixes [00:02:58] itself. And it was way better. All of a [00:03:00] sudden uh the resource use dropped. The [00:03:03] throughput of builds for all of the [00:03:04] agents actually increased. So like the [00:03:07] the oversaturation of build nodes was [00:03:10] actually hindering throughput. So it [00:03:12] didn't even benefit them to having that [00:03:14] many things running at once uh instead [00:03:15] of scaling it back. [00:03:16] And so that sort of confirmed that the [00:03:18] problem was a resource problem. Like we [00:03:20] were overusing resources. Uh but [00:03:23] that was one experiment and we we do [00:03:25] have we will talk about something [00:03:27] similar to that uh in in later in the [00:03:29] the presentation here. But we actually [00:03:31] were kind of visiting a different [00:03:33] question. Like why were we doing so much [00:03:35] work? Uh and so Drew will walk us [00:03:37] through that. [00:03:38] >> Yeah, that's right. Um so we've talked [00:03:41] about builds and actually you might [00:03:43] think, well, you know, I build my code [00:03:45] and I do that from time to time, but [00:03:47] actually probably doing many more builds [00:03:48] when you're using .NET tools than you [00:03:50] realize. [00:03:51] So the mental model of a build, I think [00:03:53] for a lot of people probably is that you [00:03:55] take a project and you build it and it [00:03:56] produces some output files. And that is [00:03:58] true. Um but builds are actually used [00:04:01] for many other things as well. One [00:04:02] example would be publish, which is kind [00:04:04] of an extension of that. We might make [00:04:05] the outputs and then do something with [00:04:07] them once they've been created. But [00:04:10] as a developer making development tools, [00:04:13] the project is the source of truth for [00:04:15] all the information you need to perform [00:04:16] whatever it is that you're actually [00:04:17] going to be doing. [00:04:19] So let's maybe step in we'll we'll go [00:04:21] into this build block and and take a [00:04:23] little look at the the steps that you [00:04:25] see within within the build. [00:04:28] Conceptually for our purposes it's a bit [00:04:30] more complicated than this, but this is [00:04:31] a useful simple way of thinking about [00:04:33] it. There's some stuff we do before we [00:04:35] compile, pre-compile step, and that's [00:04:37] for example finding all the source [00:04:38] files. You know in a SDK style project [00:04:40] you have globs, scan the disk, find all [00:04:42] the files, exclude some that might need [00:04:44] to be excluded. You got package [00:04:45] references, we're going to go and find [00:04:47] out which package it is. [00:04:50] Resolve it, maybe that's multi-targeted [00:04:52] package which target that kind of thing. [00:04:54] So there's a bunch of work that gets [00:04:55] done to resolve all of those sort of [00:04:57] core pieces of data that are needed by [00:04:59] the compiler. [00:05:01] Other settings like what language [00:05:02] version you might be using, what target [00:05:04] frameworks you're going for, etc. [00:05:06] And then the compile can run. [00:05:07] And then there's some post-compile steps [00:05:09] where those files that are created are [00:05:11] moved around to wherever they need to be [00:05:13] and other kinds of steps like that. [00:05:16] But that first step if we really focus [00:05:17] on that that's that's the part that's [00:05:19] useful to development tools. They want [00:05:21] to know what all those inputs are to the [00:05:22] compiler because if you're an IDE you're [00:05:25] running language services and [00:05:27] Intellisense and and that all happens by [00:05:29] using Roslyn behind the scenes in the [00:05:30] process, passing all that information to [00:05:32] Roslyn so it can drive those [00:05:33] experiences. [00:05:34] But other tools too like .NET Watch, [00:05:37] .NET Format, .NET Test is going to [00:05:39] do a build and produce some of that [00:05:41] information as well. [00:05:42] And so that reusable project information [00:05:44] really comes from that first step and [00:05:46] what we've done in Dev Kit is [00:05:48] take that information and write it out [00:05:50] to a cache file on disk. [00:05:52] Not really that revolutionary to write a [00:05:53] cache file to disk, but it turns out [00:05:55] it's actually incredibly handy thing to [00:05:57] have. And that cache file we can read [00:05:59] that file back. First of all it's very [00:06:01] cheap to write it out because we've got [00:06:02] all that information during the build [00:06:03] anyway. And when we read the file, it's [00:06:06] a few milliseconds to read it. So it's a [00:06:07] relatively um compressed file. [00:06:10] By comparison, if we were to call [00:06:12] MSBuild to get that information out, [00:06:13] we're talking hundreds, maybe thousands [00:06:15] of milliseconds. So it's orders of [00:06:17] magnitude different uh for performance, [00:06:19] and that gives us much better much [00:06:20] better scaling. [00:06:23] >> One thing I kind of want to call out is [00:06:24] like during that time when I went over [00:06:26] to that other team and there was tons of [00:06:28] MSBuild nodes, like even one build that [00:06:31] you're thinking of as a build can be [00:06:34] dozens of things, right? It scales to [00:06:35] like the number of projects in your [00:06:36] solution. So you're kicking off one [00:06:38] build, but it might be doing things for [00:06:39] every single project in your solution. [00:06:41] And so it's not just one operation of [00:06:43] like you're building this project and [00:06:44] you're getting binaries out. You're [00:06:46] getting information for tons of things [00:06:48] on your on your machine. Um and lots of [00:06:50] things want that information, and like [00:06:51] before they weren't coordinated. They [00:06:53] weren't sharing it. [00:06:53] >> And that team had a really huge [00:06:55] solution. They had a lot of projects, [00:06:56] and so this scales badly with the number [00:06:58] of projects you have and then the number [00:06:59] of operations you're performing. So you [00:07:00] know, they were using a lot of agents. [00:07:01] They were doing concurrent work that [00:07:03] scales on one dimension, and it just [00:07:04] multiplies. So you can kind of imagine [00:07:06] how that could get could get uh bad [00:07:08] pretty quickly. [00:07:11] Um so this is uh I think a diagram sort [00:07:13] of showing I think what we've just [00:07:14] talked about really, which is that all [00:07:15] these different scenarios are doing that [00:07:17] work to pull out the um that repeated [00:07:20] work that happens across all of those [00:07:21] scenarios. So instead of repeating them [00:07:23] when you're doing those things, if we [00:07:24] create an LS cache file, we can consume [00:07:27] it in those flows and make them a lot [00:07:28] faster. [00:07:30] So how much impact can this have? [00:07:33] For workspace loading, the impact is uh [00:07:35] pretty substantial. Here these results [00:07:37] are from C# Dev Kit. We're comparing the [00:07:40] previous version, which is version [00:07:41] three. And this version of course is [00:07:43] we've turned it up to 11. Got to throw [00:07:44] another Spinal Tap jerk into this [00:07:46] session. Haven't been enough of those. [00:07:48] Um and the results here are we can see [00:07:50] across three different um you know open [00:07:52] source solutions. You can go and try and [00:07:53] validate this for yourself. Um Olin's [00:07:55] repo, the Roslyn repo, and the Spy repo. [00:07:58] The time taken to load those um [00:08:00] workspaces has dropped by about 77% [00:08:02] across the board. And you know it's it's [00:08:04] it's the difference is [00:08:06] uh when you're sitting at the tool and [00:08:08] using it, this is the difference between [00:08:09] going and making a cup of tea or [00:08:11] checking your email or getting [00:08:12] distracted versus just getting straight [00:08:14] on with your work and remaining [00:08:15] productive. [00:08:17] And this is consistent across smaller um [00:08:19] uh solution sizes as well. Like if you [00:08:21] have a a smaller solution, the majority [00:08:23] of solutions that customers have are all [00:08:25] smaller and it will feel much closer to [00:08:27] instant. [00:08:29] And we get a lot less memory as well. Uh [00:08:31] the previous C# DevKit was using a lot [00:08:33] of memory and part of the reason that it [00:08:35] was wasn't just MS build nodes that was [00:08:37] consuming memory, it was the or the um [00:08:40] C# DevKit server process that gets [00:08:42] started up to to process all of that [00:08:44] work. [00:08:45] We now allocate 80% less memory, so you [00:08:47] know you can fit five C# DevKits if you [00:08:49] like in the space um of one from before. [00:08:53] And again, this will extend to this [00:08:55] kinds of tooling we're talking about [00:08:57] even if you're not using C# DevKit. [00:09:01] >> Kind of going back to that example. So [00:09:02] that means that if you have one human [00:09:04] and four agents on your machine, you're [00:09:05] now using roughly the same resources. So [00:09:07] theoretically, you know, your machine [00:09:09] should still feel about the same as [00:09:11] having one user on the machine like like [00:09:13] it did before. [00:09:13] >> Yeah. [00:09:14] Yeah, for that team, their screen was [00:09:15] completely locking up, which is [00:09:17] something I haven't seen for a long [00:09:18] time. It was very extreme. Yeah. So this [00:09:20] is a huge enabler for them. [00:09:23] Let's talk about BuildX, which is this [00:09:24] new uh build integration uh integration. [00:09:27] It's a build mm [00:09:29] what's the word I'm looking for? [00:09:31] >> Incremental. [00:09:32] >> It's an incremental build system. It's [00:09:33] not integration build, it's inter- [00:09:35] incremental build. Getting tongue-tied [00:09:37] here. [00:09:38] And um it's uh [00:09:40] it's in C# DevKit today and we're [00:09:42] bringing it to uh new um scenarios. [00:09:46] We're hoping to bring it to the command [00:09:47] line and make it available in other [00:09:48] contexts as well. And it uh does a a few [00:09:51] things that can make builds a lot [00:09:53] faster. [00:09:54] So uh in this example here, we have a [00:09:57] graph where we can see we're making a [00:09:58] change down at the bottom of the graph. [00:10:00] That's project H. This is supposed to be [00:10:02] a solution um with projects that [00:10:04] reference one another and we're going to [00:10:05] build that entire graph in one hit. And [00:10:07] you can see that um the compilation will [00:10:09] run from sort of all builder run from [00:10:11] the bottom up. So H will get built [00:10:12] because it has a change. Other projects [00:10:14] in this case, the ones that are in a [00:10:16] sort of like green, greenish code, those [00:10:18] ones don't need to be built. There were [00:10:19] no changes there. And then there's the [00:10:20] other ones, they need to propagate the [00:10:22] changes from H up the tree. [00:10:25] And this is what MSBuild does if you use [00:10:26] MSBuild, like if you use .NET Build for [00:10:28] example. [00:10:29] But with Build X, what happens is [00:10:31] we are able to accelerate a lot of these [00:10:33] steps. So the checking whether a [00:10:36] project needs to be built at all on a [00:10:38] project-by-project basis is much faster. [00:10:41] Again, it happens in a couple of [00:10:42] milliseconds. And then the copying of [00:10:43] files can be done without having to [00:10:46] invoke any of the machinery of of [00:10:48] MSBuild, [00:10:49] which is which is very impactful for [00:10:51] performance. So we'll see some numbers [00:10:52] here. Let's try and quantify this a [00:10:54] little bit. [00:10:56] These numbers are from the Aspire [00:10:57] solution [00:10:59] where you change one file [00:11:01] and then build the whole solution. And [00:11:03] previously a build that took 36.1 [00:11:05] seconds, now only takes like 2.1 [00:11:07] seconds, which is a massive improvement [00:11:09] in performance. And to see the impact of [00:11:12] the overhead, if you actually build and [00:11:14] you've got no changes, [00:11:16] it's now, you know, 0.9 seconds. So that [00:11:18] on the right there, on the left of the [00:11:20] chart rather, the 34.4 seconds is almost [00:11:22] entirely overhead. [00:11:24] It's just all the processing that was [00:11:26] happening in order to determine that [00:11:28] there was nothing to do. So that's a 97% [00:11:30] less build time on the [00:11:32] on the no op build case. [00:11:34] Okay. [00:11:36] So I don't get tongue tied I don't want [00:11:36] to talk anymore. We're going to go to a [00:11:37] demo. [00:11:39] We'll have a manual take us through some [00:11:40] of this stuff in a demo. [00:11:42] >> Take a look. Okay. So [00:11:45] I'm going to start from the GitHub [00:11:47] Copilot app. So we can demonstrate sort [00:11:49] of these new workflows. [00:11:52] So I I got the .NET eShop repo here and [00:11:56] I asked an action to try to add a task [00:11:59] for a scenario I think it's not quite [00:12:00] right. [00:12:02] So I did so and it build the project and [00:12:05] then it ran the test. The test failed as [00:12:07] expected. [00:12:10] So now I I two options. I can ask [00:12:11] Copilot to go and fix this issue, [00:12:13] um or I can just jump into VS Code and C [00:12:17] Sharp Dev Kit level is so much faster to [00:12:19] load. I think I'm going to do that so I [00:12:21] can uh quickly fix this uh manually. So [00:12:25] I'm going to open VS Code. So what [00:12:26] happened here is Association already [00:12:29] built the project. [00:12:31] Uh it already generated the cache files [00:12:33] that um [00:12:34] Drew mentioned, right? So now VS Code is [00:12:38] is ready to go um [00:12:40] from there. So it's starting up from um [00:12:43] the cache file. As you can see, it [00:12:45] already discovered tests. You can see [00:12:48] the commands coming up here in the [00:12:49] gutter to run the tests. And it also [00:12:52] enabled IntelliSense and all the cool [00:12:54] editing features. And you probably saw [00:12:56] some uh like colorization changes while [00:12:59] this was loading. That was when uh [00:13:01] IntelliSense became ready. So now I can [00:13:04] just directly uh go to definition and [00:13:06] have call lens support. Um all the [00:13:09] editing features [00:13:11] working. Um so [00:13:13] I can now go ahead and run the test and [00:13:15] this is going to use Build X, which is [00:13:17] what Drew was just [00:13:19] um [00:13:20] uh talking about. And it will it will [00:13:22] pretty fast. We got the failure as [00:13:24] expected. So now I'm going to go ahead [00:13:26] and navigate again here, audit item. I'm [00:13:29] going to fix this. [00:13:30] Um [00:13:33] set [00:13:34] new discount effect. And I'm going to [00:13:36] switch back my test and run it again. So [00:13:39] again, Build X is building the project. [00:13:43] Um it was fairly fast. It's it's [00:13:45] sometimes difficult into demonstrate it, [00:13:46] but it's it's running there. Yeah, we [00:13:49] got the test result. It worked. And [00:13:50] yeah, it was fairly quick to jump from [00:13:54] Copilot to VS Code. And now I can go [00:13:56] back to Copilot and keep working with [00:13:58] this uh this project. [00:14:00] Um so that's that's the demo. Um [00:14:04] one more thing um that could have [00:14:07] happened here is yeah, if I go go to [00:14:09] back to the slides um [00:14:11] >> Okay. [00:14:12] >> um the LS caches are also shared across [00:14:16] worktrees. So once one session already [00:14:19] build the projects, uh I could just [00:14:22] create a new worktree, open VS Code and [00:14:24] be ready as it was [00:14:26] uh in this scenario. [00:14:27] Um [00:14:29] we started this thinking on C Sharp Dev [00:14:32] Kit because that was the uh what you [00:14:33] described, right? They were complaining [00:14:35] about C Sharp Dev Kit. We started [00:14:36] working there with this. We shared the [00:14:39] the the cache files there, but then [00:14:41] quickly realized that was not enough um [00:14:44] and that we need to share this across [00:14:46] the .NET ecosystem. So we started [00:14:48] pushing this um down the stack uh and we [00:14:51] worked with Gane and JSON to move this [00:14:53] into Roslyn. So this is uh the [00:14:55] infrastructure to write in the cache [00:14:57] files and read them is in the Roslyn [00:14:59] repo, so it's open source. And we are [00:15:02] also inserting that in JSDK. So now [00:15:04] every build is capable of of writing [00:15:07] these files. And then all tools can [00:15:10] benefit from that. Um right now it's C [00:15:12] Sharp Dev Kit uh the tool that's [00:15:13] consuming this, but coming soon other [00:15:15] tools will join the party. [00:15:19] >> Cool. [00:15:20] So yeah, I think you demonstrated this. [00:15:21] I mean it's kind of interesting, right? [00:15:23] Like we at least at some point in time [00:15:25] identified as the C Sharp Dev Kit team. [00:15:27] Now I think we've evolved a little bit. [00:15:29] We're trying to figure out, you know, [00:15:30] where are Dev tools going? How can we [00:15:33] take the goodness, the the reduction of [00:15:36] resource use that we were able to [00:15:38] achieve in C Sharp Dev Kit and and push [00:15:41] it everywhere, right? Like we we want it [00:15:43] so that when you're doing builds, it's [00:15:45] doing as little work as possible. When [00:15:46] you're switching between experiences, [00:15:48] it's doing as little work as possible. [00:15:50] When your your session is creating more [00:15:52] sessions or if you just have multiple [00:15:54] sessions in parallel, it's sharing as [00:15:56] much work as it possibly can between [00:15:58] them all. And so we'll talk a little bit [00:16:01] about that. Um but also we acknowledge [00:16:03] that like how people are doing things is [00:16:05] changing. They are doing more and more [00:16:07] on their machines. So although the work [00:16:09] that we've done in C Sharp Dev Kit and [00:16:11] as we're pushing it down the stack will [00:16:12] enable us to have [00:16:14] five times as many things running on [00:16:16] your machine, we think that's just like [00:16:17] where we are today. We think that like [00:16:19] because your sessions are creating [00:16:20] sub-sessions and all of that and and [00:16:22] people are doing more things, they're [00:16:23] having it review code and test out code [00:16:25] and all that sort of stuff in parallel, [00:16:27] that that's not going to be enough. That [00:16:28] we're going to have to keep keep pushing [00:16:29] that boundary and realize that like we [00:16:31] are going to still oversaturate their [00:16:33] machine. And so we're still going to be [00:16:35] looking into that kind of queue idea [00:16:36] that I introduced before. And I might [00:16:38] want to tell us about that. [00:16:39] >> So yeah, that's right. So we kind of saw [00:16:42] one part of the problem or improve it, [00:16:44] uh right? So just keeping part of the [00:16:46] work, we are making it lighter, but it's [00:16:48] still work to do, right? Uh there are [00:16:50] builds that need to be run and as you [00:16:52] said, like many agents, many sessions [00:16:55] running in parallel and and that all [00:16:58] those builds will start fighting for [00:16:59] your resources at some point. And your [00:17:02] machine will become unusable again as in [00:17:05] in the scenario you you mentioned at the [00:17:07] beginning. Um so what we are working on [00:17:10] right now is an in the MSB coordinator. [00:17:13] So Dustin who uh did the first session [00:17:16] uh today with Miles, uh he implemented [00:17:18] the MSB coordinator and I've been [00:17:20] working with him to make any [00:17:21] improvements there. [00:17:23] Uh so the idea is that we need to kind [00:17:25] of ground MSB build on how many [00:17:27] resources uh it can take, right? It you [00:17:30] you will have instead of having multiple [00:17:32] builds competing for your machine, we [00:17:34] will need to have um a like a queue and [00:17:38] assign the nodes on the resources you [00:17:39] have available uh smartly to the [00:17:41] different builds you have. And and there [00:17:44] are things that are [00:17:45] with me thinking and talking about which [00:17:47] is like how can we prioritize them uh [00:17:49] because if you have multiple builds [00:17:51] running, some of them may be queued up, [00:17:53] uh but there are some that are more [00:17:55] important than others or that you care [00:17:57] about more um right now. Like if you're [00:18:00] on VS Code for instance, you probably [00:18:01] care about that build um [00:18:03] and over others or the sessions that you [00:18:06] run more frequently. Uh so there's still [00:18:09] work to do, but uh you can go give it a [00:18:11] try at least to we had today. It's an [00:18:13] update feature in MSB build. [00:18:15] >> Yeah, I'm sure. We have a lot of cool [00:18:16] stuff that we want to do in the [00:18:18] uh this one really excites me maybe [00:18:19] because it was just the original to the [00:18:21] the problem that I I I had there. But [00:18:23] like, [00:18:24] I think that there's a cool [00:18:25] idea here which is, you know, we know [00:18:28] there's multiple things on the machine, [00:18:29] but we want to prioritize the human and [00:18:31] that can mean different things. Like we [00:18:33] can infer based on, you know, where your [00:18:35] focus is, what app you're looking at, or [00:18:37] what you're doing, like which builds we [00:18:39] should prioritize. We can also like [00:18:41] thanks to LS cache stuff, before we [00:18:43] would always schedule builds, we called [00:18:45] them like design time builds to go and [00:18:46] get project information. But if your [00:18:48] agent is already in the background doing [00:18:50] a real build, we don't need to do that [00:18:51] design time build. So it's like another [00:18:52] opportunity for us to just like reduce [00:18:54] cost and how much you're doing on your [00:18:55] machine. And so once you have this sort [00:18:57] of like high level view of all the [00:19:00] builds that are happening across all the [00:19:02] different things and all the different [00:19:03] workspaces and things, you really can [00:19:04] just like [00:19:05] stop doing a lot of that work and just [00:19:07] share it between all the different [00:19:08] things that are doing it. Um it's it's [00:19:11] yeah, I'm excited about it. [00:19:12] >> In preparing for like this session, I [00:19:15] think it really reinforced just how much [00:19:18] there were a couple of things that over [00:19:20] that spanned across all these separate [00:19:21] things we were looking at and just yeah, [00:19:23] reusing work that's being done is a huge [00:19:25] one. Yeah, keeps coming up. [00:19:28] Been a little while though. Should we do [00:19:29] another demo? [00:19:30] >> Yeah. Oh, [00:19:31] sec. Yeah. [00:19:33] Yeah, I'm ready now. Yeah, let's go to [00:19:35] the demo. So [00:19:37] bring it back. Yeah. [00:19:38] So [00:19:39] I'm going to show Ulex [00:19:42] which Drew talked about uh at the [00:19:43] beginning um but from the command line, [00:19:47] uh not just from inside VS Code. Uh so I [00:19:50] had the Orchard Core um repo and I'm I'm [00:19:54] going to run a build. [00:19:55] I'm hoping this is already built. So [00:19:57] this is a no op build and there are no [00:19:59] changes here. As you can see, it was [00:20:01] immediate. [00:20:02] Um I got results immediately. So now I'm [00:20:04] going to switch [00:20:06] to their first check this diff and the [00:20:08] conf. [00:20:10] As you can see, I had a small change in [00:20:12] one of the abstraction classes. This [00:20:14] project is a dependency of many projects [00:20:17] of Orchard Core. So now I'm going to [00:20:19] switch to uh [00:20:21] to that branch. [00:20:26] Oops. [00:20:29] Yeah, perfect. And I'm going to run [00:20:32] another build. [00:20:34] So this time [00:20:36] will analyze all the projects and check [00:20:40] which ones need to be built. [00:20:45] And as you can see here, it's building [00:20:47] abstractions. If you check here, so it's [00:20:50] building the abstraction project, which [00:20:51] makes sense. It's the one I changed. And [00:20:53] then [00:20:54] it detected one other project needed to [00:20:56] be built [00:20:57] because it has a dependency on [00:21:00] abstractions. [00:21:02] But what's cool here is, besides it was [00:21:04] super fast, is that there were many [00:21:06] other projects that [00:21:09] depended on abstractions but were not [00:21:11] built, which has accelerated them, which [00:21:13] is means we copied the binaries [00:21:16] that abstraction produced to all the [00:21:18] other repos that depended on that. [00:21:20] >> Yeah, hundreds of them. Like it would [00:21:22] have been a lot it would have taken a [00:21:23] lot longer if we'd done it the old way. [00:21:25] >> Yeah, exactly. Absolutely. [00:21:29] >> Okay. [00:21:30] Thank you. Let's go back to the slides [00:21:32] and we'll talk a little bit about what [00:21:33] we want to do now, focusing a little [00:21:35] more on agents, I think. [00:21:37] It's true that [00:21:38] a lot of the techniques that we've been [00:21:40] talking about so far are good whether [00:21:41] you're human driving a machine or an [00:21:43] agent driving the tools and it's this [00:21:46] many of the things that agents do are [00:21:48] the same things that humans are doing. [00:21:50] And so if you make the tools better, it [00:21:51] benefits everybody. [00:21:53] But for this section, I want to talk a [00:21:55] little bit about some things that we [00:21:56] think we can do that are specific to [00:21:57] agents. So it's possible to detect when [00:22:00] an agent is invoking our tools and [00:22:04] potentially we can do some slightly [00:22:05] different things. [00:22:06] One of the challenges we face in making [00:22:08] developer tooling is that sometimes [00:22:09] there are optimizations that we would [00:22:11] like to [00:22:12] place into the tooling [00:22:15] which [00:22:17] will work well for 99 point some number [00:22:19] of nines of the users, but at the scale [00:22:21] at which .NET exists in the world, [00:22:24] that very small percentage of people [00:22:25] will have a difficulty with that [00:22:27] optimization. Um, it's a it's still a [00:22:29] very large number of people and we want [00:22:32] to be mindful of that. And so we we make [00:22:34] trade-offs based on on that. And [00:22:36] generally we're fairly conservative [00:22:37] about this. With an agent it's a [00:22:39] slightly different um balance, I think. [00:22:42] If if if an agent calls one of these [00:22:44] tools and we use an optimization and if [00:22:46] it we can telegraph that information in [00:22:48] maybe like a log message to say, hey [00:22:49] look this this optimization has been [00:22:52] applied. If something is wrong an agent [00:22:53] will actually dig into that, read the [00:22:55] docs, find out what's going on, and [00:22:58] maybe make an small change to the [00:23:00] project in order to make the [00:23:02] optimization work properly or perhaps [00:23:04] just disable optimization if it really [00:23:05] can't work in that scenario. And that [00:23:07] means that we can make optimizations for [00:23:09] agents that don't have the same friction [00:23:11] that they would have for a human user. [00:23:13] No one wants to upgrade their tools and [00:23:15] then hit build and nothing works. But if [00:23:16] an agent is [00:23:18] um in the loop then it's it's much [00:23:20] better at sort of papering over some of [00:23:21] those gaps and fixing things. It's not [00:23:23] papering over them, it's fixing them. [00:23:24] It's it's taking advantage of the new [00:23:26] benefits. And so we think we can roll [00:23:27] things out like that. So how do we do it [00:23:29] maybe just for agents that haven't been [00:23:31] trained on that? Agents have been [00:23:32] trained to use .NET build and .NET test [00:23:34] and that kind of thing. So maybe if an [00:23:36] agent is detected those commands, those [00:23:40] command line gestures would be detoured [00:23:42] through to a new implementation that [00:23:44] would be would be faster. So we're [00:23:46] exploring this at the moment. There's no [00:23:48] sort of commitment here yet. It's just [00:23:49] seems like a really exciting and [00:23:51] promising area for us to try and make [00:23:53] the turn time for agents faster when [00:23:56] working with .NET tooling. [00:23:58] >> Totally. Yeah, I think I'm really [00:24:00] excited about this too also. I think [00:24:01] that there's a lot of opportunity to [00:24:04] shrink how much work is done. Like I [00:24:05] think that agents have an intent and [00:24:07] then they do their thing that they're [00:24:08] they're used to doing and in a lot of [00:24:10] the other talks [00:24:11] and even in the the keynote they brought [00:24:13] up, you know, the things that we're [00:24:14] trying to do to improve .NET for that [00:24:15] agent inner loop. Like we're trying to [00:24:16] have skills and we know in your repos [00:24:19] you already have your your MD files that [00:24:21] are trying to improve things. Uh, but [00:24:23] all that is like one compact away, [00:24:24] right? And then it just goes back to [00:24:26] doing what it 's used to doing. And it [00:24:27] has it starts doing build, it starts [00:24:29] doing tests. And we want to try and like [00:24:31] take that and just like take the intent, [00:24:33] let it keep doing what he was planning [00:24:34] on doing, but then do it a better way. [00:24:36] And we're we're we're [00:24:38] I mean, if you guys have ideas, [00:24:39] definitely share them with us as well. [00:24:40] But we're willing to take this to a [00:24:42] little bit of an extreme where like it [00:24:43] says run tests, but we can probably [00:24:45] infer what tests actually need to run [00:24:47] based on what code was changed or if a [00:24:49] test was changed, maybe we just run that [00:24:50] test and we can try and do a better job [00:24:52] of like taking its intent and then doing [00:24:55] like getting at the answer it wants with [00:24:57] like the least amount of compute, the [00:24:58] least amount of time possible and just [00:25:00] shorten that loop. [00:25:01] Uh one thing I don't think we talked [00:25:02] about yet is that like in your agent [00:25:05] loop, [00:25:06] 20 to 40% of that time is actually [00:25:07] running .NET tools, right? So if we can [00:25:10] shrink that down, that's freeing up more [00:25:12] time to just, you know, let your agent [00:25:15] work and and like get the answer and do [00:25:17] its next iteration instead of just [00:25:19] waiting for our tools to run, [00:25:20] potentially doing work that it doesn't [00:25:21] even need to do. [00:25:22] >> Saving your battery life if you're [00:25:24] working on a laptop. Yeah. [00:25:25] >> true, yours. [00:25:26] >> [laughter] [00:25:28] >> Um and the intent thing is key, I think, [00:25:29] with agents. Um you know, [00:25:31] agent might be building a code in order [00:25:33] to get the errors that are in the code. [00:25:34] So if we have an LSP sort of scenario in [00:25:37] the background, we can just provide the [00:25:38] errors immediately without even doing a [00:25:40] build and that gives the agent something [00:25:41] to make progress on. Um and in the [00:25:43] meantime, we might be able to actually [00:25:44] do some of that building in the [00:25:46] background [00:25:47] um so that the next time it asks for a [00:25:48] build, we can just say yeah, it that [00:25:50] project was completed. [00:25:53] We talked a little bit about um sharing [00:25:54] between work trees and this is this idea [00:25:56] that a new session that's initialized. I [00:25:58] I personally love I've got an idea, I [00:26:00] want to try something quickly. There's a [00:26:01] fixed cost associated with spinning up a [00:26:03] new session and um I'd rather not pay [00:26:05] that personally. [00:26:07] Um especially, you know, use resources [00:26:08] on my machine. So we think that there's [00:26:10] a lot we can do there. [00:26:12] >> Yeah, just diving in. I mean, there's a [00:26:13] lot you can share. We already talked [00:26:14] about LS caches, but also copy over your [00:26:15] binaries. Like the differences between [00:26:17] branches isn't that significant, [00:26:19] especially if you're talking about a [00:26:20] solution that has 400 500 projects. How [00:26:23] often is it that in your branch you're [00:26:24] going to be changing all of those? It's [00:26:26] very low. You're going to be changing a [00:26:27] a very small subset. Why aren't we just [00:26:29] leveraging the binaries and PDBs? Why [00:26:30] are we taking up much storage even on [00:26:31] your hard drive? Um, but then [00:26:33] >> Storing packages is really expensive [00:26:35] and, you know, often we can just borrow [00:26:37] that. So. [00:26:37] >> just a no need. So we're really just [00:26:39] trying to We know that [00:26:40] like operations that were maybe more [00:26:42] rare before, like, you know, creating a [00:26:44] work tree, now they're happening dozens, [00:26:46] potentially hundreds of times a day, and [00:26:48] and this is another opportunity for us [00:26:49] to share work, stop doing work. [00:26:51] >> Yeah. And that was the theme in the [00:26:52] opening of the keynote there was that [00:26:54] .NET continues to evolve and in it, you [00:26:56] know, along with the different eras of [00:26:58] development that we've had, and this is [00:26:59] another one. [00:27:00] Tooling has come along with us. [00:27:01] >> Yeah. [00:27:05] >> That's it. We're going to go now to [00:27:06] questions. If there is any questions [00:27:08] there, Maddie, what have you got for us?