import: Use pub_date to sort message ids.

When we create new ids for message rows, we
now sort the new ids by their corresponding
pub_date values in the rows.

This takes a sizable chunk of memory.

This feature only gets turned on if you
set sort_by_date to True in realm.json.
This commit is contained in:
Steve Howell
2018-10-16 10:34:47 +00:00
committed by showell
parent d1ff903534
commit bd9e4ef0c8
5 changed files with 126 additions and 4 deletions

View File

@@ -679,6 +679,8 @@ def do_convert_data(input_tar_file: str, output_dir: str) -> None:
# we process everything else, since we may introduce
# mirror users when processing messages.
realm['zerver_userprofile'] = user_handler.get_all_users()
realm['sort_by_date'] = True
create_converted_data_files(realm, output_dir, '/realm.json')
logging.info('Start importing avatar data')