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

CurlyMoo / rules / 41
97%

Build:
DEFAULT BRANCH: main
Ran 11 Apr 2021 08:00PM UTC
Jobs 1
Files 24
Run time 2s
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

11 Apr 2021 07:57PM UTC coverage: 97.829% (+0.2%) from 97.639%
41

push

travis-ci-com

CurlyMoo
<a href="https://github.com/CurlyMoo/rules/commit/<a class=hub.com/CurlyMoo/rules/commit/<a class="double-link" href="https://git"><a class=hub.com/CurlyMoo/rules/commit/7863ea54e7739f62514819dfdb530a07bc23e195">7863ea54e<a href="https://github.com/CurlyMoo/rules/commit/7863ea54e7739f62514819dfdb530a07bc23e195"><a href="https://github.com/CurlyMoo/rules/commit/7863ea54e7739f62514819dfdb530a07bc23e195">&quot;&gt;Kinda revert &lt;/a&gt;&lt;a class=&quot;double-link&quot; href=&quot;https://github.com/CurlyMoo/rules/commit/&lt;a class=&quot;double-link&quot; href=&quot;https://github.com/CurlyMoo/rules/commit/4db5a4befd6156cb57e127f5f2c313176220fc87&quot;&gt;4db5a4bef</a>">4db5a4bef</a><a href="https://github.com/CurlyMoo/rules/commit/7863ea54e7739f62514819dfdb530a07bc23e195"> to prevent memory fragmentation

With commit </a><a class="double-link" href="https://github.com/CurlyMoo/rules/commit/<a class="double-link" href="https://github.com/CurlyMoo/rules/commit/759f0350575ee606f36e56705add13c008ad43e7">759f03505</a>">759f03505</a><a href="https://github.com/CurlyMoo/rules/commit/7863ea54e7739f62514819dfdb530a07bc23e195">
the AST size can be calculated up front. That means
there is no gain in eating the original rule. Instead,
eating the original rule offers new issues, which is
memory fragmentation.

Eating the original rule can mean that a new block
of memory is allocated according to the newly prefered
size, next to the original memory block. So instead of
using less memory this may shorty use more memory when
reallocating to a smaller size.

Another downside of constantly reallocating memory is
that the parsing speed can be up to 30 times slower.
In the old situation the same rule was parsed in 5
seconds. Reverting the eating logics increases that
speed back to 0.17 seconds.

The last improvement with this commit is that the
original preperation doesn&#39;t require a new memory
allocation. Instead, the original rule is overwritten
with new preperation logic.

So,
- One allocation for the ruleset read from the filesystem.
- One allocation for the AST.
- One reallocation when a rule block has been parsed.
- One free when all rules are parsed.

The best approach to keep memory allocation low is to
split the ruleset in multiple files of let's say 2048Kb

2388 of 2441 relevant lines covered (97.83%)

1151.1 hits per line

Jobs
ID Job ID Ran Files Coverage
1 41.1 (PLATFORM=Unix COMPILER=gcc COVERAGE=1) 11 Apr 2021 08:00PM UTC 0
97.83
Travis Job 41.1
Source Files on build 41
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #41
  • 7863ea54 on github
  • Prev Build on main (#40)
  • Next Build on main (#42)
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