Kovid Goyal
2ba28171ab
DRYer
2024-07-16 10:45:46 +05:30
Kovid Goyal
c056df223e
Nicer way to prevent defrag
2024-07-16 07:43:50 +05:30
Kovid Goyal
56bd1f59dd
cleanup must be called with lock held
2024-07-15 22:07:50 +05:30
Kovid Goyal
24e6dda0bc
disk-cache: Improve hole management
...
Make coalescing of neighboring holes robust. Speed up hole finding.
Cost is we replace a single array tracking holes with three hashmaps
tracking size->[pos] pos->size and endpos->size.
2024-07-15 21:13:59 +05:30
Kovid Goyal
aaf7808328
Add explicit check for holes in test
2024-07-15 09:05:44 +05:30
Kovid Goyal
7d685fc98b
Getting size of cache file should not change its position
2024-07-12 11:45:48 +05:30
Kovid Goyal
6958803fec
Add some locking to python disk cache test API
2024-07-12 11:45:48 +05:30
Kovid Goyal
53eff7927a
Migrate disk cache to verstable
2024-07-12 11:45:45 +05:30
Kovid Goyal
2d18e0be81
Fix #7311
2024-04-05 20:00:08 +05:30
Kovid Goyal
c3869dc479
...
2024-03-01 11:07:51 +05:30
Kovid Goyal
1a9a7a59ac
Make XOR64 test also test alignment issues
2024-02-25 09:57:44 +05:30
Kovid Goyal
ad3ab877f8
Use a fast SIMD implementation to XOR data going into the disk cache
2024-02-25 09:57:43 +05:30
Kovid Goyal
88f3c8c5ee
Reduce max key size in disk cache
...
We used only 12 byte keys no need to have a max key size more than 16
2024-02-25 09:57:43 +05:30
Kovid Goyal
de92470f0d
Improve performance of disk cache when there are thousands of small images
...
Fixes #7080
2024-02-25 09:57:43 +05:30
Kovid Goyal
b560fe34c9
Give the functions for creating various objects unique names so they are easily recognized in macOS's non-fully-symolicated crash reports
2024-02-25 09:57:37 +05:30
Kovid Goyal
6c7a8f8fa9
Ensure usage of __attribute__(cleanup) never frees un-initialized memory
...
Use macros that take an initializer parameter to, thereby ensuring the
variable to be cleaned up is always initialized.
2023-08-07 12:24:18 +05:30
Kovid Goyal
c004fd1f4d
Declare the set of handled signals in only one place
2022-06-05 08:01:26 +05:30
Kovid Goyal
bd21b79959
Only malloc the buffer for fast file copy when needed
2021-11-24 18:20:37 +05:30
Kovid Goyal
732ff7ee58
Move copy between files into its own module
2021-11-24 16:42:52 +05:30
Kovid Goyal
f081d6a421
Fix #4270
2021-11-24 16:37:27 +05:30
Kovid Goyal
b25ea9c863
Fix #3913
2021-08-09 08:37:53 +05:30
Kovid Goyal
be34af4555
Remove inline from .c files
...
It is ignored by compilers and hides unused static functions
2021-08-03 09:11:17 +05:30
Kovid Goyal
f3364cfdc0
Guard against invalid cache file in a couple more places
2021-05-13 09:51:57 +05:30
Kovid Goyal
ec68739585
Make it harder to forget to redefine uthash_fatal
2021-05-07 06:58:54 +05:30
Kovid Goyal
dd0130180b
Use the kitty fatal function
2021-05-06 11:19:06 +05:30
Kovid Goyal
fc184984a0
...
2021-04-27 15:11:34 +05:30
Kovid Goyal
2178ff1c48
DRYer
2021-04-27 15:07:27 +05:30
Kovid Goyal
ae1df38c88
Fallback to mkostemp if O_TMPFILE fails
2021-04-27 12:03:24 +05:30
Kovid Goyal
7ec803222f
Fix a mem leak of the disk cache directory path
2021-04-10 13:21:58 +05:30
Kovid Goyal
2a96d2621c
Use cleanup in a few more places to simplify the code
2021-02-19 18:53:30 +05:30
Kovid Goyal
12604072fc
Allow querying number cached in ram from c code as well
2021-02-19 09:28:56 +05:30
Kovid Goyal
0341b64748
Allow caching of disk cache entries in RAM
2021-02-18 10:22:42 +05:30
Kovid Goyal
726d736aac
Type check return value of cache_dir
2021-02-05 10:34:17 +05:30
Kovid Goyal
0adbbc6d62
Implement loading of frame animation data
2021-01-31 20:58:41 +05:30
Kovid Goyal
5a182d3d13
Store image data in a disk cache
2021-01-31 20:58:41 +05:30
Kovid Goyal
d55fde9eea
Use EINTR safe wrappers for open() and shm_open()
2021-01-31 07:02:11 +05:30
Kovid Goyal
2762488c81
Remove double increment
2021-01-03 21:10:37 +05:30
Kovid Goyal
1b59a1c421
Finish tests of disk cache
2021-01-03 17:36:40 +05:30
Kovid Goyal
df00e9545d
Add some more ensure_state()
2021-01-03 12:13:08 +05:30
Kovid Goyal
d1496f1eb5
Use O_TMPFILE when available
2021-01-03 07:07:50 +05:30
Kovid Goyal
14d9bcb08a
Go back to nanosleep since it is in POSIX
2021-01-03 06:45:53 +05:30
Kovid Goyal
c869774c58
More tests for the disk cache
2021-01-03 06:22:48 +05:30
Kovid Goyal
18679348b2
Use usleep rather than nanosleep
2021-01-03 05:00:40 +05:30
Kovid Goyal
8f58140419
Start work on tests for disk cache
2021-01-03 04:28:48 +05:30
Kovid Goyal
bc86bc91f7
Auto-defrag cache file
2021-01-02 11:32:38 +05:30
Kovid Goyal
7f73609c77
Update total_size when removing cache items
2021-01-01 14:31:57 +05:30
Kovid Goyal
49562e96cc
Python wrappers for the disk cache methods
2021-01-01 14:08:23 +05:30
Kovid Goyal
58b1868536
When cache is emptied clear disk file to avoid fragmentation
2021-01-01 13:15:21 +05:30
Kovid Goyal
1cad40e977
...
2021-01-01 12:03:09 +05:30
Kovid Goyal
9fbf23fdcc
Implement simple defrag for on-disk cache
2021-01-01 11:54:13 +05:30