You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2022/03/21 17:36:22 UTC
[GitHub] [couchdb] nickva opened a new pull request #3963: Opimtize key tree stemming by using maps instead of sets
nickva opened a new pull request #3963:
URL: https://github.com/apache/couchdb/pull/3963
sets to due to a compiler bug in 22 consumes too much memory and is slower on Erlang 22+
Reproducer: https://gist.github.com/nickva/ddc499e6e05678faf20d344c6e11daaa
With sets:
```
couch_key_tree:gen_and_stem().
{8,6848.812683105469}
```
With maps:
```
couch_key_tree:gen_and_stem().
{0,544.000732421875}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb] kocolosk commented on pull request #3963: Opimtize key tree stemming by using maps instead of sets
Posted by GitBox <gi...@apache.org>.
kocolosk commented on pull request #3963:
URL: https://github.com/apache/couchdb/pull/3963#issuecomment-1075830926
Now you're just showing off 😉 Nice work!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb] davisp commented on pull request #3963: Opimtize key tree stemming by using maps instead of sets
Posted by GitBox <gi...@apache.org>.
davisp commented on pull request #3963:
URL: https://github.com/apache/couchdb/pull/3963#issuecomment-1074214047
I'd also note that this improves performance across the board. Using maps on 20 and 21 also improves against current baseline.
+1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb] nickva merged pull request #3963: Opimtize key tree stemming by using maps instead of sets
Posted by GitBox <gi...@apache.org>.
nickva merged pull request #3963:
URL: https://github.com/apache/couchdb/pull/3963
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb] nickva commented on pull request #3963: Opimtize key tree stemming by using maps instead of sets
Posted by GitBox <gi...@apache.org>.
nickva commented on pull request #3963:
URL: https://github.com/apache/couchdb/pull/3963#issuecomment-1075723247
Trying the optimization with a production revision tree with 6638 live conflicts.
```
length(couch_key_tree:get_all_leafs(Tree)).
6638
```
Measured time to run `couch_key_tree:stem(Tree, 1000)`
### Before this commit
| Erlang Version | Time (sec) | Memory (GBs) |
|----------------|-------|---------|
| 20 | 221 | 1.2 |
| 23 | 1382 | 45 |
### After this commit
| Erlang Version | Time (sec) | Memory (GBs) |
|----------------|-------|---------|
| 20 | 3 | 1.2 |
| 23 | 3 | 1.3 |
In summary, on Erlang 23, we got a nice **460x** speedup and **34x** memory usage reduction
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org