Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Memory problems in the case of large data volumes!!! #4

Closed
higher2016 opened this issue Aug 28, 2019 · 12 comments · Fixed by #5
Closed

Memory problems in the case of large data volumes!!! #4

higher2016 opened this issue Aug 28, 2019 · 12 comments · Fixed by #5

Comments

@higher2016
Copy link

@johtani
Copy link
Owner

johtani commented Aug 28, 2019

Hi @higher2016
Good catch. One question. Do you have any issue on that?

@higher2016
Copy link
Author

The problem we faced was very simple, so we use a simple way to fix it. We just use apache's StringUtil to cute the input string and get the string array. But this solution does not satisfy all situations. My advice is to avoid creating objects inside the methods. If you are interested our test data, we can communicate privately.

@johtani
Copy link
Owner

johtani commented Sep 4, 2019

Thanks. Of course I can understand your suggestion and it make sense.
I'll make a simple benchmark on JVM heap size before and after. Please wait a moment :)

@higher2016
Copy link
Author

Thanks. But now Japan is estimated to be at 1 am, pay attention to rest.

@johtani
Copy link
Owner

johtani commented Sep 4, 2019

Ah, "a moment" that I meant is few days...

@johtani
Copy link
Owner

johtani commented Sep 4, 2019

Create a parser instance at Constructor

[2019-09-04T18:51:11,957][INFO ][i.j.e.p.i.c.CsvProcessorTests] [testManyTimes] start
[2019-09-04T18:51:12,380][INFO ][i.j.e.p.i.c.CsvProcessorTests] [testManyTimes] end. Loop is 50000 times. Process Time is 422 ms

Create a parser instance in process method.

[2562-09-04T11:53:13,798][INFO ][i.j.e.p.i.c.CsvProcessorTests] [testManyTimes] start
[2562-09-04T11:53:21,188][INFO ][i.j.e.p.i.c.CsvProcessorTests] [testManyTimes] end. Loop is 50000 times. Process Time is 7389 ms

@higher2016
Copy link
Author

I‘m no sure if CsvParser is thread safe. And one more question, why the way that Create a parser instance at Constructor use more time?

@johtani
Copy link
Owner

johtani commented Sep 5, 2019

Oh, I mistook. that's opposite, so I updated the comment. I shouldn't do something in midnight :p

johtani added a commit that referenced this issue Sep 7, 2019
johtani added a commit that referenced this issue Sep 25, 2019
@johtani
Copy link
Owner

johtani commented Sep 25, 2019

I'm releasing to Sonatype, but Sonatype respond 502 or 504... please wait a release...

@johtani
Copy link
Owner

johtani commented Sep 26, 2019

Fixed >= version 7.3.2

@johtani
Copy link
Owner

johtani commented Sep 26, 2019

Hi @higher2016 ,
I released the plugin 7.3.2 that fixed this issue. If you are interested in, please try it.

johtani added a commit that referenced this issue Dec 3, 2019
johtani added a commit that referenced this issue Dec 3, 2019
CSV parser is not thread safe

Closes #4

(cherry picked from commit bcd151a)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants