Working on large or even huge text files with several hundred MB or even GB should be done with UltraEdit only after special configuring UE for this task. The IDM power tip large file text editor
as well as some forum topics explain how to configure UltraEdit for editing large files.
I have read several times in the last years complaints of UltraEdit users about speed on large files. What I have never understood is that most of those users do not use the text editor UltraEdit for editing
the files, they use UE for just viewing
large log files, or large CSV files, or large fixed column text files (text files with constant number of characters per line). The CSV and fixed column text files are usually created by an export from a large database.
A text editor is designed for editing tasks and not for viewing tasks. Therefore a text editor can't be as good as an application designed for just displaying text files for viewing and searching something in large files. From time to time I have to look something in log files too. But I never open the log files in UltraEdit because I don't want to edit them.
My favorite file manager Total Commander
has built-in a lister
tool. This lister just offers what I need when looking on a log file: display the text, offer me to search for something within the text, select something and copy the selection. The text is displayed (by default) simply as black text on white background (colors can be configured). No syntax highlighting, no folding, no feature to hide lines, no line numbers (which means no line counting on scroll necessary), just pure text and a simple to use search feature for looking on something in the text file. The advantage of this pure viewer tool within Total Commander: it is fast, very fast. The lister is also available as free standalone tool
if somebody is interested in.
However, you use very limited Windows Explorer as file manager and the extremly powerful text editor UltraEdit for working with text files. Therefore you are not interested in applications designed for quickly viewing text files because you think that should be also possible with UltraEdit.
Well, there are methods to view efficiently large files also with UltraEdit. But first it is important to disable usage of a temporary file for large text files and disable line counting as explained in the power tip. UltraEdit can't be as fast as lister in Total Commander if for example a search for a string is executed where the lister of Total Commander needs just search for this text and display the block around the found occurrence while UltraEdit has to additionally check every byte from current position in the file to the found occurrence to determine if it is a carriage return or a linefeed to show the user finally also on which line within the file the string was found. Line respectively record counting is easy in databases designed for an easy jump from one record to next record by simply adding a fixed offset to file pointer. But a text editor can't do that if every line (record) can have every length from 0 to file size.
The easiest method to look on something in a large file with UltraEdit is to simply search for a string of interest and user F3 for searching for next occurrence or Ctrl+F3 for searching backwards for previous occurrence. Lines of no interest should not be removed or hidden because that requires an action on the entire large file most often not really needed. Just ignore the lines of no interest.
Many users often use a special find feature to reduce the number of lines and then search with their eyes and brains. Why this inefficient 2 step process? Why not searching directly with the application for the lines of interesting instead of filtering and then searching with the results with own brain? I have never understood that. An application is faster finding something on lines than our human brain. The only exception is when not really knowing what to look for. But even in this case it is according to my experience better to run several finds with different search strings than starting analyzing all lines of a text file with my brain.
It is possible with a single hotkey execution to select the entire line containing a found string to get a better focus on the line. But with active line highlighting this is not really needed as also searching with a regular expression which matches an entire line containing a string of interest. Regular expression search are always slower than simple, non regular expression searches. And simple case sensitive text searches are the fastest searches at all.
But you might want nevertheless a filtered output of a large file. Well, in this case there are several options to get such a filtered output:
- Use a Find with buttons Hide Lines or Show Lines. I can't recommend that for large files where the search string is found very often.
- Use a Find with the option List Lines Containing String. That is quite fast and the found lines are written into a resizable dialog window (UE < 18.00) or a dockable window (UE >= 18.00) for further processing (with human brain). I can't recommend using this option if the searched string is found very often in a large file.
- Use a regular expression Replace All to delete all lines not of interest. This opposite method in comparison to above can be faster, but it modifies the file and an undo is not possible if the large file is opened without using a temporary file for fast opening and fast modifications.
- Use a Find in Files with found lines written to output window. It is possible to run a Find in Files just on all open files which is on a single file if no other files are currently opened in UltraEdit.
And even if other files are opened, Find in Files can be executed on a single file if first full name of a file is copied with Edit - Copy Full Path/Name to Windows clipboard, then the Find in Files dialog is opened, the Directory path is cleared and the full file name is pasted into the edit field of In Files/Types.
The found lines can be viewed in the output window. A double click on a line results in showing this line in the document window. And it is possible with pressing Ctrl+Shift+Down/Up to get the next/previous line in output window displayed in the document window without moving focus to output window or moving the fingers from the keyboard.
The format of the output can be customized at Advanced - Configuration - Search - Set Find Output Format.
- Similar to above a [b]Find in Files can be used to get the found lines written to a document window. The lines in this results file can be viewed like the file itself. Additionally when file name and line number are also present on every found line, it is possible to jump to this line in the source file by right clicking on the file name and using first option in context menu or by executing the hotkey assigned to command FileOpenFileUnderCursor.