Comments (2)
After optimizing the usage of asMongoUrl
, there was a significant performance improvement:
ABBench bench: [
ABBench
a: [ maplessPool getIdleReadOnlyClientOld ]
b: [ maplessPool getIdleReadOnlyClient ]
].
"B is 573.88% FASTER than A"
And with a profiling ran after introducing that, we can observe that ZnUrl>>=
is not exactly cheap:
Reporting - 43,635 tallies, 5,018 msec.
**Tree**
100.0 (5,018) BlockClosure newProcess
100.0 (5,018) MorphicUIManager spawnNewProcess
100.0 (5,018) WorldMorph class doOneCycle
100.0 (5,018) WorldMorph doOneCycle
100.0 (5,018) WorldState doOneCycleFor:
100.0 (5,018) WorldState doOneCycleNowFor:
100.0 (5,018) WorldMorph runStepMethods
100.0 (5,018) WorldState runStepMethodsIn:
100.0 (5,018) GLMMorphicPharoScriptRenderer [GLMMorphicPharoCodeRenderer] actOnHighlightAndEvaluate:
100.0 (5,018) RubEditingArea [RubAbstractTextArea] handleEdit:
100.0 (5,018) GLMMorphicPharoScriptRenderer [GLMMorphicPharoCodeRenderer] actOnHighlightAndEvaluate:
100.0 (5,018) RubSmalltalkEditor highlightEvaluateAndDo:
100.0 (5,018) RubSmalltalkEditor evaluate:andDo:
100.0 (5,018) OpalCompiler evaluate
100.0 (5,018) UndefinedObject DoIt
100.0 (5,018) BlockClosure bench
100.0 (5,018) BlockClosure benchFor:
100.0 (5,018) UndefinedObject DoIt
100.0 (5,018) MaplessMongoReplicaSetPool getIdleReadOnlyClient
53.7 (2,695) Set class newFrom:
|53.6 (2,690) Set [Collection] addAll:
| 53.400000000000006 (2,680) IdentitySet [Set] do:
| 52.900000000000006 (2,655) Set [Collection] addAll:
| 52.900000000000006 (2,655) Set add:
| 29.400000000000002 (1,475) Set [HashedCollection] atNewIndex:put:
| |1.6 (80) ByteString class stringHash:initialHash:
| 23.5 (1,179) Set scanFor:
| 23.5 (1,179) ZnUrl =
| 10.9 (547) ZnUrl equals:
| |10.9 (547) ZnUrl portOrDefault
| | 3.5 (176) ZnUrl portIfAbsent:
| | |1.8 (90) True ifTrue:ifFalse:
| | 2.6 (130) ByteString class compare:with:collated:
| 1.7000000000000002 (85) ByteString class stringHash:initialHash:
30.3 (1,520) MaplessWeightedRandomPolicy nextAmong:
|15.3 (768) MaplessWeightedRandomPolicy next
| |8.4 (422) SmallInteger *
| | |0.5 (25) SmallFloat64 truncated
| |2.4000000000000004 (120) MaplessWeightedRandomPolicy getNext:
| | |2.4000000000000004 (120) OrderedCollection [Collection] detect:ifNone:
| | | 1.5 (75) OrderedCollection [Collection] detect:ifFound:ifNone:
| | | 0.8 (40) OrderedCollection do:
| |0.4 (20) ByteString class stringHash:initialHash:
|15.0 (753) Set includes:
| 15.0 (753) Set [HashedCollection] findElementOrNil:
| 15.0 (753) Set scanFor:
| 15.0 (753) ZnUrl =
| 5.6000000000000005 (281) ZnUrl equals:
| |5.6000000000000005 (281) ZnUrl portOrDefault
| | 2.1 (105) ZnUrl portIfAbsent:
| | |1.0 (50) True ifTrue:ifFalse:
| | 1.2000000000000002 (60) ByteString class compare:with:collated:
| 0.8 (40) ByteString class stringHash:initialHash:
14.8 (743) IdentitySet [Collection] detect:ifNone:
|14.700000000000001 (738) IdentitySet [Collection] detect:ifFound:ifNone:
| 14.200000000000001 (713) IdentitySet [Set] do:
| 8.8 (442) IdentitySet [Collection] detect:ifFound:ifNone:
| |8.8 (442) MaplessMongoReplicaSetPool getIdleReadOnlyClient
| | 8.8 (442) ZnUrl =
| | 8.8 (442) ZnUrl equals:
| | 8.8 (442) ZnUrl portOrDefault
| | 2.0 (100) ZnUrl portIfAbsent:
| | |0.9 (45) True ifTrue:ifFalse:
| | 1.1 (55) ByteString class compare:with:collated:
| 0.7000000000000001 (35) ByteString class compare:with:collated:
1.1 (55) IdentitySet [Set] collect:
0.6000000000000001 (30) Array [SequenceableCollection] do:
**Leaves**
5.6000000000000005 (281) ByteString class compare:with:collated:
4.5 (226) ByteString class stringHash:initialHash:
3.7 (186) True ifTrue:ifFalse:
0.8 (40) OrderedCollection do:
0.5 (25) SmallFloat64 truncated
**Memory**
old +0 bytes
young +899,336 bytes
used +899,336 bytes
free -899,336 bytes
**GCs**
full 0 totalling 0ms (0.0% uptime)
incr 1349 totalling 572ms (11.0% uptime), avg 0.0ms
tenures 0
root table 0 overflows
**Processes**
Total process switches: 87289
Without Profiler: 19
Stack page overflows: 15583
Stack page divorces: 33
from mapless.
Improved here #130
from mapless.
Related Issues (20)
- Prune MaplessSQLitePool from unneeded methods
- Add CI via GitHub workflows HOT 1
- Update master to latest production versions for Pharo 7 HOT 1
- Current latest can't be loaded in Pharo 10 HOT 1
- Update github pages
- Readme missing step HOT 1
- Pin all dependencies versions HOT 1
- Rename Dummy* to Sample* HOT 1
- Add relevant badges HOT 1
- Explore possibility of using Traits to drop the requirement to subclass HOT 4
- Redis PUB/SUB HOT 2
- Improve unit test coverage for Mapless-Mongo-Core
- Make SQLite log all queries if LOG_LEVEL env var is #DEBUG
- CouchDB use case
- Is Gatling worth adding?
- Postgres -> PostgreSQL and Mongo -> MongoDB
- fromBSONByteArray: aByteArray in: aMaplessRepository HOT 1
- Minor doc edits HOT 1
- MaplessSQLitePool remove: needs to update its API for disconnecting clients HOT 1
- Move MaplessBehavior to its own package HOT 1
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 mapless.