List<MBArtist> mbArtists = new ArrayList<>();
mbids = missingArtists.size();
for (Artist artist : artistDao.getMissingArtists()) {
try {
StringUtil response = new StringUtil(artistQueryClient.get(artist.getName()));
ArtistQueryParser parser = new ArtistQueryParserImpl(response.getInputStream());
if (parser.getArtist() != null) {
mbArtists.add(parser.getArtist());
if (mbArtists.size() > 100) {
artistDao.createArtists(mbArtists);
mbArtists.clear();
}
}