在eclipse中查看大型XML文件? [英] Viewing large XML files in eclipse?

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

问题描述

我正在从事一个涉及一些大型XML文件(从50MB到超过1GB)的项目,如果我可以在eclipse(简单的文本视图很好)中查看它们,而不会使用超出堆的空间,那将是很好的。我试过调整eclipse.ini中jvm可用的内存量,但没有太大的成功。有任何想法吗?

解决方案

我不确定你可以打开这样大的文件,如已经在2005年



你最终会得到

 !MESSAGE无法创建编辑器ID org.eclipse.ui.DefaultTextEditor:无法初始化编辑器。 
!STACK 0
java.lang.OutOfMemoryError:Java堆空间

时间,如此线程所述)。



我刚刚使用最新的SO转储:350Mo。

(堆栈溢出数据转储 - 11月09\Content\so-export-2009-10\comments.xml)



它花了我一个 Xmx (见我的eclipse.ini )设置为超过3Go可以:




  • 打开它

  • 切换到另一个文件(那是在刚刚离开的文件上尝试快速差异,并消耗更多记忆)



所以这根本不是正确的工具(我用e ClipS3.6M3,最新的JDK,在Windows7 Ultimate和4GoRAM ...)。






几个笔记:如果您的文件不是打开eclipse的工作空间中显示的文件,eclipse将不会尝试为该文件使用任何内存,所以p>



  • 从该文件切换触发快速差异(因为本地历史选项。

  • 关闭文件不会释放任何内存(直到全天候重新启动)






所以在这一点上,一个工具就像我在提到的一个问题 4G文件的最佳免费文本编辑器大文本文件查看器(即使其网站,swiftgear)是down 自2008年底以来,是一个有效的替代方案。


I'm working on a project involving some large XML files (from 50MB to over 1GB) and it would be nice if I could view them in eclipse (simple text view is fine) without Java running out of heap space. I've tried tweaking the amount of memory available to the jvm in eclipse.ini but haven't had much success. Any ideas?

解决方案

I am not sure you can open such large files, as stated already in 2005.

You will end up with

!MESSAGE Unable to create editor ID org.eclipse.ui.DefaultTextEditor: Editor could not be initialized.
!STACK 0
java.lang.OutOfMemoryError: Java heap space

every time 'as mentioned in this thread).

I just tested that with the comment.xml of the latest SO dump: 350Mo.
(Stack Overflow Data Dump - Nov 09\Content\so-export-2009-10\comments.xml)

It took me a Xmx (see my eclipse.ini) set to more than 3Go to be able to:

  • open it
  • switch to another file (that is when of tries a quick diff on the file you just left, and consume even more memory)

So it is simply not the right tool (and I tested it with eclipse3.6M3, latestest JDK, on a Windows7 Ultimate and 4GoRAM...).


Couple of notes:

  • if your file is not the one being displayed in your workspace when you open eclipse, eclipse will not try to consume any memory for that file yet. It will wait until you select it for display.
  • Switching from that file triggers a quick diff (because of the 'local history' option.
  • closing the file will not free any memory (not until a full eclipse restart)

So at this point, a tool like the one I mention in the question Best Free Text Editor Supporting More Than 4G Files?: Large Text File Viewer (even though its site, swiftgear) is down since late 2008, is a valid alternative.

这篇关于在eclipse中查看大型XML文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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