hugo/source
Tatsushi Demachi 0c98d8e9ed Use LazyFileReader for reading file contents
Simple ioutil.ReadFile is used for reading file contents but it reads
all of the file contents and copies them into the memory and is run in a
single goroutine. It causes much memory consumption at copying media
files in content directory to publish directory and it is not good at
performance.

This improves the both issue by replacing ReadFile with LazyFileReader.

It postpones reading the file contents until it is really needed. As the
result, actual file read is run in parallelized goroutine. It improves
performance especially in a really big site.

In addition, if this reader is called from io.Copy, it does not copy the
file contents into the memory but just copies them into destination
file. It improves much memory consumption issue when the site has many
media files.

Fix #1181
2015-08-22 19:43:15 +02:00
..
content_directory_test.go Add some tests for IgnoreFiles 2015-06-03 18:54:15 +02:00
file.go source/File: Fix data races 2015-07-21 20:02:42 +02:00
file_test.go source: add some test cases for File 2015-03-12 20:50:44 +01:00
filesystem.go Use LazyFileReader for reading file contents 2015-08-22 19:43:15 +02:00
filesystem_test.go convert path 2 filepath 2014-11-13 22:37:14 -05:00
filesystem_unix_test.go Testcases for multilevel structure were wrong 2013-12-16 17:43:53 -05:00
filesystem_windows_test.go Fix various Windows-issues 2014-12-09 09:43:15 -05:00
inmemory.go Big refactor of how source files are used. Also added default destination extension option. 2014-10-16 20:20:09 -04:00
lazy_file_reader.go Add LazyFileReader type to source library 2015-08-22 19:43:15 +02:00
lazy_file_reader_test.go Add LazyFileReader type to source library 2015-08-22 19:43:15 +02:00