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

zendframework / zend-mail / 23
38%

Build:
DEFAULT BRANCH: master
Ran 02 Jun 2015 09:15AM UTC
Jobs 1
Files 90
Run time 12s
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

pending completion
23

Pull #6

travis-ci

echampet
Protocol\Smtp->data(): be more memory friendly (strpos/substr version)

With huge mails (50M, 660000 lines), i'm hitting memory_limit, so i've done some tests
looking at peak memory usage and average time(100 runs)
- str_replace("\r","") + explode("\n") 250M/0,27s (what we use now)
- preg_split("\r?\n") 200M/1,5s (too slow)
- strtok("\n") + rtrim("\r") 100M/0,27s (convert multiple \n\n\n in 1 -> ko)
- strpos("\n") + substr() 50M/0,35s
- fwrite(php://temp) + stream_get_line 50M/0,29s

All tests were run with 'php -d"memory_limit=256M" -d"opcache.enable_cli=1"'
With that many iteration (660000), factoring escape+send cost ~0.1s

Before this patch, we were removing \r, now we're keeping them,
in any case \r should be encoded

Signed-off-by: Etienne CHAMPETIER <etienne.champetier@fiducial.net>
Pull Request #6: Protocol\Smtp->data(): be more memory friendly (strpos/substr version)

14 of 14 new or added lines in 1 file covered. (100.0%)

1537 of 3791 relevant lines covered (40.54%)

9.45 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
2
100.0
src/Protocol/Smtp.php
Jobs
ID Job ID Ran Files Coverage
2 23.2 (EXECUTE_TEST_COVERALLS=true) 02 Jun 2015 09:14AM UTC 0
40.54
Travis Job 23.2
Source Files on build 23
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #23
  • Pull Request #6
  • PR Base - master (#19)
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