Comments (3)
JIT costs?
from jena.
JIT costs?
Possibly, this might be a good area to write some JMH benchmarks around
The difference in performance is fairly minimal (though noticeable) in these test cases but I first found this issue because I refactored some $dayjob code and performance went from 15ms to 15 seconds so in worst case it can be dramatic difference
from jena.
This is what I get:
t
is with transaction, otherwise without.
Same data text creation code.
One round of 5 each: (dataset created outside of the timing)
1: 0.677s
2: 0.463s
3: 0.372s
4: 0.442s
5: 0.335s
t1: 0.255s
t2: 0.249s
t3: 0.328s
t4: 0.302s
t5: 0.237s
reversed:
t1: 0.587s
t2: 0.331s
t3: 0.356s
t4: 0.258s
t5: 0.353s
1: 0.427s
2: 0.322s
3: 0.321s
4: 0.327s
5: 0.335s
and after a few more rounds, 5: 0.315s
and t5: 0.237s
. So some benefit from a transaction and no harm but specific times by contract
TIM datasets are general and robust (they provide MR+SW and are always thread safe with an "autocommit".
If the app really wants speed, use DatasetGraphFactory.create
as in parse-to-dataset_02
-- 5: 0.083s
and t5: 0.083s
. The transaction support is a lock and, being uncontended, it is cheap.
Speed up comes from class loading happening once and JIT-optimizing the parser
public static void run(String label, Creator<DatasetGraph> maker, String text) {
DatasetGraph dsg = maker.create();
long millis = Timer.time(()->{
RDFParserBuilder builder = RDFParserBuilder.create().lang(Lang.NQUADS).fromString(text);
builder.parse(dsg);
});
System.out.println(label+ ": "+Timer.timeStr(millis)+"s");
}
public static void runTxn(String label, Creator<DatasetGraph> maker, String text) {
DatasetGraph dsg = maker.create();
long millis = Timer.time(()->{
dsg.executeWrite(()->{
RDFParserBuilder builder = RDFParserBuilder.create().lang(Lang.NQUADS).fromString(text);
builder.parse(dsg);
});
});
System.out.println(label+": "+Timer.timeStr(millis)+"s");
}
from jena.
Related Issues (20)
- [Fuseki] Reloadable configuration files HOT 5
- `mvn clean install` fails HOT 8
- RDFXML: can't parse rdf:XMLLiteral HOT 17
- Spread out the days dependabot PRs are generated
- OntModel enhancements HOT 3
- Fuseki query endpoint stopped working on jena-fuseki-main upgrade HOT 6
- jena-benchmark-jmh module defunct HOT 10
- Remove <dependencyPath> from POMs where it is unnecessary
- Clean warnings in jena-ontapi
- trouble with Fuseki UI and one AJAX request (/$/stats) HOT 9
- Fuseki HttpAction: Check and improve the transaction lifecycle for HTTP action execution.
- Fuseki - setting the context path to a relative path causes 404s.
- Support for SPARQL CDTs (lists and maps as literals) HOT 1
- Using a reasoner to retrieve individuals beloning to a Class HOT 3
- How do you work with jena-fuseki-ui for local development? HOT 4
- Update jena-text to use Lucene in a Java21 compatible way.
- Always use hash joins when joining VALUES blocks HOT 3
- Prefixes Service
- More granular control over Blank node serialization HOT 1
- Error parsing linkedart context definition HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jena.