Search code examples
emeditor

Some issues when edit large files more than 100GB


Sometime when edit large files like more than 100GB. (my pc physical memory is 128GB and using nvme ssd)

  1. small change . vs fast save ? when i did a small change on the file, like deleting the first line of a file. Is there a more efficient way to complete this function ? 200gb file takes half a hour to save.

  2. Sometime emeditor will detect json or csv error rows. Is it easy to mark these rows as bookbooks? So it will be easy to extract or delete these lines.

  3. Can sequence number auto-fulling used in replace ?

When edit more than 100M rows. As I know, the normal function should be switch into csv mode and insert a new column. and then filled with sequence numbers. these steps also time-consuming.

These step can be fullfilled by replace function? an example bellow.

example:

{"Genres":"Drama","Product":"Ice Cream - Super Sandwich","Title":"White Lightnin'"} {"Genres":"Drama|War","Product":"Raspberries - Frozen","Title":"Leopard, The (Gattopardo, Il)"} {"Genres":"Crime|Drama|Film-Noir","Product":"Cookie Dough - Chunky","Title":"Limits of Control, The"} {"Genres":"Drama|Mystery","Product":"Watercress","Title":"Echoes from the Dead (Skumtimmen)"} {"Genres":"Drama|Thriller","Product":"Cumin - Whole","Title":"Good People"}

need to convert into

{"id":1,"Genres":"Drama","Product":"Ice Cream - Super Sandwich","Title":"White Lightnin'"} {"id":2,"Genres":"Drama|War","Product":"Raspberries - Frozen","Title":"Leopard, The (Gattopardo, Il)"} {"id":3,"Genres":"Crime|Drama|Film-Noir","Product":"Cookie Dough - Chunky","Title":"Limits of Control, The"} {"id":4,"Genres":"Drama|Mystery","Product":"Watercress","Title":"Echoes from the Dead (Skumtimmen)"} {"id":5,"Genres":"Drama|Thriller","Product":"Cumin - Whole","Title":"Good People"}

data created by Mockaroo


Solution

  • Assuming you are running a relatively recent version of EmEditor

    Find (Ctrl+ F): {

    Options: Match Case, Close when Finished, (None)

    Click [Select All] (should all be selected in your file)

    Edit Menu - Advanced - Numbering (or Alt+ N)

    First Line:{"id":1

    Increment:1

    Make sure Decimal is selected

    Click [OK]