moby/libcontainerd
Brian Goff 8d588d9c5b Don't json marshal then immediately unmarshal
During container startup we end up spending a fair amount of time
encoding/decoding json.
This cuts out some of that since we already have the decoded object in
memory.

The old flow looked like:

1. Start container request
2. Create file
3. Encode container spec to json
4. Write to file
5. Close file
6. Open file
7. Read file
8. Decode container spec
9. Close file
10. Send to containerd.

The new flow cuts out steps 6-9 completely, and with it a lot of time
spent in reflect and file IO.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-06-21 15:18:01 -07:00
..
client.go fix typo in libcontainerd/client.go 2017-01-11 23:10:02 +08:00
client_linux.go Use containerd Status variable when checking container state 2017-05-15 10:53:51 -07:00
client_solaris.go Add expected 3rd party binaries commit ids to info 2016-11-09 07:42:44 -08:00
client_unix.go Don't json marshal then immediately unmarshal 2017-06-21 15:18:01 -07:00
client_windows.go Windows: Correct comment 2017-06-02 11:51:30 -07:00
container.go Remove restartmanager from libcontainerd 2016-10-07 12:09:54 -07:00
container_unix.go Don't json marshal then immediately unmarshal 2017-06-21 15:18:01 -07:00
container_windows.go Stop holding client container lock during shutdown 2017-03-07 16:24:34 -08:00
oom_linux.go Add functional support for Docker sub commands on Solaris 2016-11-07 09:06:34 -08:00
oom_solaris.go Add functional support for Docker sub commands on Solaris 2016-11-07 09:06:34 -08:00
pausemonitor_unix.go Add functional support for Docker sub commands on Solaris 2016-11-07 09:06:34 -08:00
process.go Replace execdrivers with containerd implementation 2016-03-18 13:38:32 -07:00
process_unix.go Use containerd Status variable when checking container state 2017-05-15 10:53:51 -07:00
process_windows.go Windows: Remove unused commandLine 2017-02-02 11:16:11 -08:00
queue_unix.go Add functional support for Docker sub commands on Solaris 2016-11-07 09:06:34 -08:00
remote.go Add --live-restore flag 2016-06-13 19:16:26 -07:00
remote_unix.go Limit max backoff delay to 2 seconds for GRPC connection 2017-06-02 18:19:09 +08:00
remote_windows.go Add --live-restore flag 2016-06-13 19:16:26 -07:00
types.go Use containerd Status variable when checking container state 2017-05-15 10:53:51 -07:00
types_linux.go Use containerd Status variable when checking container state 2017-05-15 10:53:51 -07:00
types_solaris.go Use containerd Status variable when checking container state 2017-05-15 10:53:51 -07:00
types_windows.go Windows: Remove unused SandboxPath 2017-05-24 13:44:35 -07:00
utils_linux.go Use containerd Status variable when checking container state 2017-05-15 10:53:51 -07:00
utils_solaris.go Use containerd Status variable when checking container state 2017-05-15 10:53:51 -07:00
utils_windows.go Windows: Support credential specs 2016-10-06 09:32:22 -07:00
utils_windows_test.go Allow windows environment variables to contain = 2016-09-05 08:49:07 +10:00