如何处理大文件? [英] How to deal with large files?

查看:99
本文介绍了如何处理大文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在大文件编辑中,移动非常缓慢,我们如何才能提高处理速度?

On a large file editing, moving very slowly, how can we increase the processing speed?

推荐答案

除了您实际上没有提供太多信息之外,有一个大文件".那是我不会去那里的主观价值.

首先,文件有多大?什么类型的文件?说这是一个有150,000条记录的平面文件.您可以放一个启动屏幕,然后将整个内容吸到内存中,然后以这种方式遍历.效率不高,但比直接处理平面文件要好.

您可以考虑吸收平面文件并将其加载到数据库中.这样可以加快处理速度,并使您的逻辑更容易.

可能是您刚刚编写了错误的代码.向我们展示您在做什么,您会得到更好的答案.
You really do not provide much information other than the fact you have a "large file". That is such a subjective value I won''t go there.

First, how large is the file? What type of file? Say it is a flat file with 150,000 records. You could put up a splash screen and suck the whole thing into memory then walk through it that way. Not efficient but better than processing a flat file directly.

You could consider sucking up the flat file and loading it into a database. That could speed up processing and make your logic easier.

It could be you have just written bad code. Show us what you are doing and you will get a better answer.


这篇关于如何处理大文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆