I think a code page is better than explanation : First we are using the parsing of open csv with two strategy (parse by column position or column names) CsvToBean<VehicleImport> csvToBean = new CsvToBeanBuilder<VehicleImport>(reader) .withType(VehicleImport.class) .withIgnoreLeadingWhiteSpace(true) ** .withMappingStrategy(csvConf.isPositionMapping() ? new ColumnPositionStrategy(mapping, this) : new ColumnNameStrategy(mapping, this))** .withSeparator(csvConf.getDelimiterChar() != null ? separatorService.get(csvConf.getDelimiterChar())...
I tried to to something using iterator but same behaviour appear the memory never go down , so i'm just wondering if you already seen this type of issues with some client. I tried a head dump i can see a lot of char[] but its does not me help at all :( So i don't what's to do. csvToBean = new CsvToBeanBuilder(br) .withType(typeParameterClass) .withIgnoreLeadingWhiteSpace(true) .withFieldAsNull(CSVReaderNullFieldIndicator.EMPTY_QUOTES) .withFieldAsNull(CSVReaderNullFieldIndicator.EMPTY_SEPARATORS)...
Yeah i'm trying this with iterator but I see exactly the same use of ram it goes over 1Go :( BUT if i'm using this GC it works very well ! : -XX:+UseParNewGC try (BufferedReader br = Files.newBufferedReader(path, charset)) { CsvToBean csvToBean =new CsvToBeanBuilder(br) .withType(typeParameterClass) .withIgnoreLeadingWhiteSpace(true) .withFieldAsNull(CSVReaderNullFieldIndicator.EMPTY_QUOTES) .withFieldAsNull(CSVReaderNullFieldIndicator.EMPTY_SEPARATORS) .withSeparator(separator) .withFilter(this::skipEmptyLines)...
Yeah i'm trying this with iterator but I see exactly the same use of ram it goes over 1Go :( try (BufferedReader br = Files.newBufferedReader(path, charset)) { CsvToBean csvToBean =new CsvToBeanBuilder(br) .withType(typeParameterClass) .withIgnoreLeadingWhiteSpace(true) .withFieldAsNull(CSVReaderNullFieldIndicator.EMPTY_QUOTES) .withFieldAsNull(CSVReaderNullFieldIndicator.EMPTY_SEPARATORS) .withSeparator(separator) .withFilter(this::skipEmptyLines) .build(); Iterator it = csvToBean.iterator(); while...
Well I dont want you tom interprete the profiles :) I,m just worried about the fact that there is probably a limit in the library to parse file like 50mo of data using the CsvToBeanBuilder my question is, do you have already see that thing with other users (this big use of memory using opencsv ? with file like 50mo or 100mo ) Maybe I will be able to contact somebody else and see their experiences about your library.
Yup this is exactly what I 'm currently using with intellij https://ibb.co/gZ7pnxq https://ibb.co/LvRVWVJ is it possible that object that we created from the file are too big ?
Yup this is exactly what I 'm currently using with intellij https://ibb.co/gZ7pnxq https://ibb.co/LvRVWVJ