xml upload very slow
I am uploading xml files into mysql database by parsing them...
I am able to upload the files, but it is taking a very long time to upload the files which have some 1,00,000 rows.
I am sometimes also getting the heap space exceptions...
How to increase the speed of uploading the xml data...
Do I need to increase my virtual memory.(I am presently using 512 mb).
You should increase the virtual machine to avoid the heap space error and for speed, You should follow the following step:-
1. Create the class XYZ, class variable will all xml child tag.
2. Create Another Class XYZList, extends from arraylist.
3. Parse the xml, and create the XYZ object and set all value of xml tag to its object, and put inside the XYZList object.
4. After this, get connection object and put the data inside the database one by one.
RAM should be atleast 1gb for gud speed