• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / tarantool / 5656316303
88%

Build:
DEFAULT BRANCH: master
Ran 25 Jul 2023 11:50AM UTC
Jobs 1
Files 490
Run time 13s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

25 Jul 2023 11:41AM UTC coverage: 86.094% (-0.006%) from 86.1%
5656316303

push

github

locker
box: speed up select/pairs with pagination by reusing ibuf

The normalize_position() internal function is called by select/pairs to
prepare a position specified by the caller in the options.after argument
to be passed to C over FFI. The function encodes the position passed as
a table or a tuple in a temporary buffer obtained with cord_ibuf_take().
The problem is the cord buffer is already taken by the calling function
(select/pairs) to encode the search key. As a result, cord_ibuf_take()
allocates a new temporary buffer with malloc.

Let's avoid this extra buffer allocation by passing the taken buffer to
normalize_position(). Let's also remove the out arguments because they
are always set to iterator_pos and iterator_pos_end and instead set
iterator_pos and iterator_pos_end directly. To make this behavior clear,
we rename normalize_position() to iterator_pos_set(). We also remove
box.error() from this function and instead make it return true/false so
that the caller can release the buffer on failure.

perf/lua/box_select.lua test results:

                      base          patched
              get_0    159      153 (-  3%)
              get_1    243      243 (+  0%)
           select_0    227      227 (+  0%)
           select_1    343      336 (-  2%)
           select_5   2323     2305 (-  0%)
          select_10   6832     6866 (+  0%)
     select_after_0    687      558 (- 18%)
     select_after_1    746      524 (- 29%)
     select_after_5   2917     2704 (-  7%)
    select_after_10   5033     4979 (-  1%)
 select_fetch_pos_0    239      233 (-  2%)
 select_fetch_pos_1    418      413 (-  1%)
 select_fetch_pos_5   2492     2496 (+  0%)
select_fetch_pos_10   5121     5179 (+  1%)
            pairs_0    320      314 (-  1%)
            pairs_1   1060     1054 (-  0%)
            pairs_5   1466     1459 (-  0%)
           pairs_10   3749     3913 (+  4%)
      pairs_after_0    788      670 (- 14%)
      pairs_after_1   1813     1611 (- 11%)
     ... (continued)

63479 of 115292 branches covered (55.06%)

95154 of 110524 relevant lines covered (86.09%)

2864768.46 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5656316303.1 25 Jul 2023 11:50AM UTC 0
86.09
GitHub Action Run
Source Files on build 5656316303
Detailed source file information is not available for this build.
  • Back to Repo
  • 1cda22aa on github
  • Prev Build on master (#5655183435)
  • Next Build on master (#5669782695)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc