java - Spring Hibernate MySQL- 50k insert taking 20minutes -


i have been working on project using latest appfuse base.. have extended lot of models particularly user accommodate of things doing, 1 of them adding few lists user have larger lists attached them, here example: user -> leadlists (maybe 100 or of these) -> leads (upwards of 50k) , problems start. have process working user uploads csv parse lead objects , add them list user save user , let cascade save work. once save fires takes 20 minutes or more finish , permgen memory error... problem #2 once in db have not been able display them @ without getting permgen out of memory error.

can please offer insight may doing wrong? have enabled hibernate batch size , set 50, else can ridiculous insert time down?

did write code using hibernate batch processing best pratice?
if not, check link.
if yes , trying write single user+leadlists(100)+leads(50k) in single shot (are 50k items!!! that's no peanuts!) have choices:

  1. move flat jdbc (orm not best choice batch programming) can solution, required rewrite parts of code probably,
  2. move statelesssession (just give chance),but think permgen error around corner,
  3. increase permgen space - sized on statistics objects dimension, example - can resolve permgen problem not slow issue

  4. drastic: move spring-batch, framework used perform batch conversion of big amount of data. reduce lot saving time, sure resolve permgen space (the real problem, imo. slow program better 1 crash , lose data)

my 2 cents


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -