middleman / middleman-blog

Blog Engine Extension for Middleman
https://middlemanapp.com
MIT License
325 stars 179 forks source link

Binary awesomeness #350

Closed dtorres closed 5 years ago

dtorres commented 7 years ago

This patch caches the sorted articles so to do it only once. In my synthetic benchmark (generated ~1500 articles with a lorem ipsum content) It went from 108 seconds to 88

bundle exec middleman build 88.71s user 3.49s system 273% cpu 33.764 total bundle exec middleman build 108.48s user 4.03s system 265% cpu 42.429 total

I no longer use middleman-blog but found this while researching for https://github.com/middleman/middleman/issues/2105

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.002%) to 92.802% when pulling 4aeae3bc1636cbc9e8dce6a559b0f9c4c6588c8b on dtorres:binary_awesomeness into e495bbebfac3d10b3093b9b4e6a9fb30f4e735d3 on middleman:master.

TheSmartnik commented 5 years ago

@dtorres Hi! Thank you for your pull request. Ruby has bsearch. Can you refactor to use it? It should be even faster as it's implemented in C


I know it's been awhile since you've opened up this pull request. Really sorry for that 😞

dtorres commented 5 years ago

@TheSmartnik As I said, no longer using it and I long deleted my dev env for this project.

Good luck!