Two ways you can try: 1) Wrap your FileInputStream with a BufferedInputStream, like:
InputSource biginput = new InputSource(new BufferedInputStream(new FileInputStream("C:\\kurs.xml"))); 2) Use SAX Mikael Helbo Kjær wrote: > Hi everyone. > I`m developing a Java Xml application and I`m testing different Java XML > parser. I`ve tested the Oracle XML Parser (fastest so far, but uses a lot of > memory) and Suns jaxp (slower, but parses big files fastest) and I`m of > course also testing the Xerces-J parser (I`ve followed the project since > December), but I´ve encountered a major problem when parsing > (non-validating) a 9 MB file, the parsing is incredibly slow (995562 ms), > which is clearly unacceptable for any application in terms of response time.