-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile.txt
69 lines (51 loc) · 2.07 KB
/
profile.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
- choose some process-intensive application (e.g., glean)
add following to pom.xml:
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>wvw.glean.cig.CIGTest</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
- use mvn to package jar-with-dependencies:
(Eclipse export "runnable jar" doesn't work properly)
mvn clean compile assembly:single
- start VisualVM
VisualVM: Applications > Profile startup (requires "Startup Profiler" plugin)
class to be profiled: e.g., wvw.glean.cig.CIGTest
- run the following in cmd:
/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/bin/java -agentpath:/Applications/VisualVM.app/Contents/Resources/visualvm/visualvm/lib/deployed/jdk16/mac/libprofilerinterface.jnilib=/Applications/VisualVM.app/Contents/Resources/visualvm/visualvm/lib,5140 -jar target/glean-0.0.1-SNAPSHOT-jar-with-dependencies.jar
(try different port number if it complains that the process is already running!)
- NOTES
lot of time spent on parsing N3 code (over half..)
comment out Log.info's in FRuleEngine, for pete's sake .. (400ms total time)
second, running transitAll -> .. -> FRUleEngine.fastInit/saturate
processTriggerClauses (25.5%)
-> tryRule .. matchRuleBody .. matchClauseList (20.8%)
-> matchClauseList (11.8%)
-> sortOnRuleBoundedness (1.4% + 0.3% + 0.3%)
tryUniversalRules (4.5%)
hot spots:
highest self-time: NiceIterator.hasNext, FilterIterator.next, RuleUtil.match ..
sortOnBoundedness: total time: 2,5s!
InputConstraint.check: 307ms
ground: 1.9s
InstantiateTriplePatternVisitor.visitNode
..visitCitedFormula: 1.6s
..visitCollection: 1.4s
when using compound-term-caching in visitor:
much less time spent on visiting collections, cited-formulas