1
1
mirror of https://github.com/walles/moar.git synced 2024-11-30 02:34:13 +03:00
moar/m
Johan Walles c8a8cb4517 Improve memory usage for large files
Test:
* Open a 35MB text file
* Search it for some string it doesn't contain

Memory usage before this change: 2.3GB
Memory usage after this change:  0.5GB

The trick is to only provide cells from Lines on demand, since we only
need a few of them when scrolling.

And not storing all of those cells is where the gain in memory usage
comes from.
2021-04-24 16:27:54 +02:00
..
ansiTokenizer_test.go Fix errcheck reported problems 2021-04-20 08:43:37 +02:00
ansiTokenizer.go Improve memory usage for large files 2021-04-24 16:27:54 +02:00
embed-api.go Improve memory usage for large files 2021-04-24 16:27:54 +02:00
highlight.go Don't highlight files larger than 1MB 2021-04-24 16:14:30 +02:00
matchRanges_test.go Make a lot fewer functions public 2020-12-29 22:57:44 +01:00
matchRanges.go Make a lot fewer functions public 2020-12-29 22:57:44 +01:00
pager_test.go Don't highlight files larger than 1MB 2021-04-24 16:14:30 +02:00
pager.go Use our new tcell replacement 2021-04-17 22:29:41 +02:00
reader_test.go Don't highlight files larger than 1MB 2021-04-24 16:14:30 +02:00
reader.go Don't highlight files larger than 1MB 2021-04-24 16:14:30 +02:00