discriminators performance
See original GitHub issueHello,
Im using this kind of mapper :
this.mapper = JdbcMapperFactory
.newInstance()
.addKeys("id")
.discriminator(A.class,
"type",
ResultSet::getString,
builder-> builder.discriminatorCase("TYPEA1", A1.class)
builder-> builder.discriminatorCase("TYPEA2", A2.class)
builder-> builder.discriminatorCase("TYPEA3", A3.class)
builder-> builder.discriminatorCase("TYPEA4", A4.class)
.......
)
.discriminator(B.class,
"b_type",
ResultSet::getString,
builder-> builder.discriminatorCase("TYPEB1", B1.class)
builder-> builder.discriminatorCase("TYPEB2", B2.class)
builder-> builder.discriminatorCase("TYPEB3", B3.class)
builder-> builder.discriminatorCase("TYPEB4", B4.class)
........
)
.newMapper(A.class);
I have a resultset which contains 100K row with 7 columns.
Here is the code mapping rs to list :
String query = "....";
L.info("execute : {}", query);
long start = System.currentTimeMillis();
List objects = new ArrayList();
try (PreparedStatement ps = this.datasource.getConnection().prepareStatement(query);
ResultSet rs = ps.executeQuery()) {
L.info("execute in {} ms", System.currentTimeMillis() - start);
start = System.currentTimeMillis();
objects = mapper.stream(rs).collect(Collectors.toList());
L.info("mapped in {} ms", System.currentTimeMillis() - start);
} catch (SQLException e) {
L.error("impossible to map the result set", e);
}
my timings are : execute in 288 ms mapped in 5103 ms
How can I help you troubleshoot this ?
Issue Analytics
- State:
- Created 5 years ago
- Comments:28 (17 by maintainers)
Top Results From Across the Web
Performance evaluation of differential and discriminator ...
The performance of CPM systems is analyzed for differential and discriminator detection. An additive white Gaussian channel is assumed. The detectors make ...
Read more >Ways to improve GAN performance | by Jonathan Hui
It introduces randomness that makes the discriminator harder to overfit itself. Feature matching is effective when the GAN model is unstable during training....
Read more >Discriminators of high performing schools and low performing ...
Ten high schools each from high Mathematics performance and low Mathematics performance groups were the study area. The study was conducted in ...
Read more >Jamar Discriminator | Performance Health
The perfect sensation testers for evaluating static and moving one and two-point discrimination. This discriminator set includes two disks for testing and ...
Read more >A high-performance, low-cost, leading edge discriminator
A high-performance, low-cost, leading edge discriminator has been designed with a timing performance comparable to state-of-the-art, commercially available.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
yep looks like it, I should be able to fix that.
thanks a lot for your support !