I made a Django application (runs on Apache mod-wsgi server) which reads contents of a file(with million entries in it) and displays it after performing some operations on it (operation time very less compared to read time).
Actually the file stores the metadata of objects in cloud. So instead of fetching the data from cloud everytime a user opens the application, the metadata is cached on the server which is used. This cached data is synced regularly with cloud to store the latest metadata.
Now the problem with this is that the data in cloud scales exponentially due to which the cached metadata in the file also increases thereby increasing the number of entries which in turn slows down the application.
What should I do to reduce the read time of file so that the application reads quickly and in turn load time decreases?
Sample data in File (separator used is '<=>' instead of comma)