-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add colored blockquotes! (Markdown preprocessor) + Benchmarks #484
Comments
The system I'm working on now is pretty cool, but adds a lot of complexity. We'll see how it goes, maybe it belongs in a dedicated package. (crosspost from #483 (comment)) |
Benchmarks for the feature as it is now:Note this is a rather crude benchmark, rand() is used to try to spoof PHP from caching the results. System info for all tests
The test cases1 Benchmark baseline for parsing normal blockquoteBenchmark::run(function () {
echo (new \Hyde\Framework\Services\MarkdownConverterService('> '.rand(0, 1000)))->parse();
}, 10000, 'Baseline Test'); 2 Benchmark baseline for parsing normal blockquote with the entire preprocessing system disabledBenchmark::run(function () {
echo (new \Hyde\Framework\Services\MarkdownConverterService('> '.rand(0, 1000)))->parse();
}, 10000, 'Baseline No-Processing'); 3 Benchmark for the colored blockquote preprocessorBenchmark::run(function () {
echo (new \Hyde\Framework\Services\MarkdownConverterService('>info '.rand(0, 1000)))->parse();
}, 10000, 'Colored Blockquotes'); Results (single line tests)
Result analysisIt's expected that the second case without any processing is the fastest. What I did not expect is that the colored blockquotes are faster. I wonder if this is because my test somehow is misrepresenting, though it in a way makes sense as it is very possible that my Markdown parser is faster than the CommonMark one. Either way, in this test scenario the difference is negligible, though I want to test with a multiline dataset. |
Adds a class representation of the schemas hydephp/develop@79626d6
See #483 (comment)
The text was updated successfully, but these errors were encountered: