The time taken to load a file (in text mode) increases as the file gets larger. When viewing really large files, it is likely that you just want to look at the start and/or end of the file. In this case, it is pointless to try and load the entire file. Why load all of a 100Mb file, when you just want to view the last few lines?
In order to keep the load time to a minimum, V breaks the file into chunks. The size of the chunk is specified in the More Options tab of the Preferences Dialog box (it defaults to 8Mb). File Chunks are enabled by default - to disable them, just clear the Enable File Chunks option.
When a file is to be viewed, V checks the size of the file, and if it is larger than the chunk size, will only load the first chunk in the file (or the last chunk if you are viewing the tail).
An extra toolbar will appear in the top right of the window, which lets you load further chunks, and an extra status bar pane also appears in the bottom of the window, which displays which chunk is currently being viewed. You may also click on this area of the status bar to display available chunk options.
Once a chunk is loaded, the scrollbars restrict movement to within the chunk. That is, sliding the vertical scrollbar all the way to the bottom, will take you to the end of the chunk, not the end of the file. Also, the displayed line numbers are not always correct when viewing a file in chunks.
Click here for further details on line numbering in chunks.
Searching is not restricted to the current chunk. If a string is found outside the current chunk, then the appropriate chunk is automatically loaded.
In the Goto Dialog Box, offsets and line numbers are relative to the start of the file, not to the start of the chunk. This means that if you were viewing the last chunk of a file, going to line 1 will take you to the very start of the file and not to the start of the chunk.
Click here for further details on Goto and chunks.
The buttons on the chunk toolbar have the following function:
First Chunk |
Loads the first chunk in the file. This will be disabled if the first chunk is the chunk currently being viewed. |
Next Chunk |
Loads the next chunk in the file.
|
Previous Chunk |
Loads the previous chunk in the file. |
Last Chunk |
Loads the last chunk in the file. This will be disabled if the last chunk is the chunk currently being viewed. |
Entire File |
This will load the entire file, and the chunk toolbar will disappear. Note that this may take some time, depending on the size of the file. (See note below). |
Pressing the PageDown and LineDown keys while at the very end of a chunk will automatically load the next chunk. Pressing the PageUp and LineUp keys while at the very start of a chunk will load the previous chunk.
Chunks in Hex mode
File chunks do not usually apply in hex mode - the entire file is displayed, even if it is larger than the chunk size. However, if the file size is extremely large (usually > 2Gb), V will also use chunks in hex mode. This behaviour depends on available system memory and cannot be disabled.
Notes
•The end of a chunk will usually fall somewhere in the middle of a line. V tries to break a chunk at the end of a line, however, this may not always be possible. Because of this, the last line of a chunk may sometimes be the same as the first line of the next chunk.
•You may go to an absolute chunk number by using the Goto Dialog box.
•If V takes more than 5 seconds to load the entire file, it will display a progress dialog that will allow you to cancel the operation if you think it will take too long.