nix-gl-host/tests/fixtures/json_permut/not-equal.json
Félix Baylac Jacqué 3ff2f01812 Hot Cache: use the DSO last write time/size instead of content hash
After profiling a nixglhost hot run, it turns out that we were
spending more than 98% of the run time reading and sha256-hashing
files.

Let's give up on content hashing the files and assume that using their
name, size and last write time is good enough.

On a hot run, we reduce the run time from about 3s to 0.3s on a
nvme-powered ryzen 7 desktop.

I guess this 10x speedup probably worth the little cache corectness we
lose on the way.
2022-12-14 19:20:10 +01:00

84 lines
1.9 KiB
JSON

{
"paths": [
{
"glx": [
{
"name": "dummyglx.so",
"dirpath": "/lib",
"fullpath": "/lib/dummyglx.so",
"last_modification": 2670260550.481498,
"size": 2612
}
],
"cuda": [
{
"name": "dummycuda.so",
"dirpath": "/lib",
"fullpath": "/lib/dummycuda.so",
"last_modification": 2670260550.481498,
"size": 2612
}
],
"generic": [
{
"name": "dummygeneric.so",
"dirpath": "/lib",
"fullpath": "/lib/dummygeneric.so",
"last_modification": 3670260550.481498,
"size": 3612
}
],
"egl": [
{
"name": "dummyegl.so",
"dirpath": "/lib",
"fullpath": "/lib/dummyegl.so",
"last_modification": 4670260550.481498,
"size": 4612
}
],
"path": "/path/to/lib/dir"
},
{
"glx": [
{
"name": "dummyglx.so",
"dirpath": "/lib",
"fullpath": "/lib/dummyglx.so",
"last_modification": 5670260550.481498,
"size": 5612
}
],
"cuda": [
{
"name": "dummycuda.so",
"dirpath": "/lib",
"fullpath": "/lib/dummycuda.so",
"last_modification": 6670260550.481498,
"size": 6612
}
],
"generic": [
{
"name": "dummygeneric.so",
"dirpath": "/lib",
"fullpath": "/lib/dummygeneric.so",
"last_modification": 7670260550.481498,
"size": 7612
}
],
"egl": [
{
"name": "dummyegl.so",
"dirpath": "/lib",
"fullpath": "/lib/dummyegl.so",
"last_modification": 8670260550.481498,
"size": 8612
}
],
"path": "/path/to/lib/dir2"
}
],
"version": 3
}