# Decouple workspace from call \(\#3380\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/6da57cbc6e33a7d1ede533ecc11948292feb22f3)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 6da57cbc6e33a7d1ede533ecc11948292feb22f3

Requested commit: 6da57cbc6e33a7d1ede533ecc11948292feb22f3

Commit: 6da57cbc6e33a7d1ede533ecc11948292feb22f3

Tree: 8687514801ef94e3f36fdf0b889bb129e0502a27

Author: Piotr Osiewicz

Committer: GitHub

## Message

```
Decouple workspace from call (#3380)

This PR decouples `call2` from `workspace2` in order to improve our
compile times.
Why pick such a small, innocent crate as `call`? It depends on
`live_kit_client`, which is not-so-innocent and is in fact stalling our
clean builds.
In this PR, `call2` depends on `workspace2`; workspace crate defines a
`CallHandler` trait for which the implementation resides in `call`; it
it then all tied together in `zed`, which passes a factory of `Box<dyn
CallHandler>` into workspace's `AppState`.
Clean debug build before this change: ~1m45s
Clean debug build after this change: ~1m25s

Clean release build before this change: ~6m30s
Clean release build after this change: ~4m30s

~Gonna follow up with release timings where I expect the change to be
more impactful (as this allows 2/3 of the infamous trio of
"project-workspace-editor" long pole to proceed quicker, without being
blocked on live-kit-client build script)~.
This should have little effect (if any) in incremental scenarios, where
live_kit_client is already built.
[release
timings.zip](https://github.com/zed-industries/zed/files/13431121/release.timings.zip)

Release Notes:
- N/A
```

## Parents

- [62b18437044c9e2b7e4ef2ba24fbbf12444a48c7](https://git.cafe/gitcafe/zed/commit/62b18437044c9e2b7e4ef2ba24fbbf12444a48c7?format=markdown)

- [b45234eecea255cc3fef12b1c5fbf58dba40892e](https://git.cafe/gitcafe/zed/commit/b45234eecea255cc3fef12b1c5fbf58dba40892e?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/6da57cbc6e33a7d1ede533ecc11948292feb22f3?format=markdown)
