Giter Club home page Giter Club logo

Comments (14)

vladshcherbin avatar vladshcherbin commented on July 17, 2024

@peter-mw
2.0 version (for Laravel 4) is a Parsedown wrapper
3.0 version (for Laravel 5) is a Commonmark wrapper

from laravel-markdown.

peter-mw avatar peter-mw commented on July 17, 2024

@vladshcherbin thanks for the info

Seems I will use v3.0 besides its not based on Parsedown

Hope this issue erusev/parsedown#213 goes resolved and this lib to be using Parsedown as it is the one of the fastest markdown processors

from laravel-markdown.

GrahamCampbell avatar GrahamCampbell commented on July 17, 2024

Yeh, you're correct. It should say CommonMark now. CommonMark is far better written than parsedown, although it might not do as well in a benchmark, but in a large system, this different is so small, you won't notice.

from laravel-markdown.

peter-mw avatar peter-mw commented on July 17, 2024

@GrahamCampbell
League\Commonmark is written in more verbose style, but in terms of performance it cant beat Parsedown

from laravel-markdown.

GrahamCampbell avatar GrahamCampbell commented on July 17, 2024

"verbose" doesn't really cut it. It's a totally different architecture.

from laravel-markdown.

GrahamCampbell avatar GrahamCampbell commented on July 17, 2024

I would recommend anyone to switch to commonmark, hence why I've switched this package to it. It's far superior.

from laravel-markdown.

GrahamCampbell avatar GrahamCampbell commented on July 17, 2024

Parsedown is probably struggling to be commonmark compliant due to it's optimization for performance leading to it being poorly architected. Sorry. :(

from laravel-markdown.

peter-mw avatar peter-mw commented on July 17, 2024

Yes you are certainly right that is better written and the architecture is better

But do we have to include lib that is made of 120 fifes instead of one file as in parsedown?

from laravel-markdown.

GrahamCampbell avatar GrahamCampbell commented on July 17, 2024

I don't understand why that matters?

from laravel-markdown.

peter-mw avatar peter-mw commented on July 17, 2024

It maybe does not. I am deploying some Laravel 5 stuff on shared hostings with limited resources and the number of files loaded on request is like 315+ and i want to keep those numbers down

from laravel-markdown.

GrahamCampbell avatar GrahamCampbell commented on July 17, 2024

Laravel can compile the files to one file if you want.

from laravel-markdown.

GrahamCampbell avatar GrahamCampbell commented on July 17, 2024

Laravel uses a package that I'm co-maintaining atm under the hood to do this: https://github.com/mtdowling/ClassPreloader.

from laravel-markdown.

peter-mw avatar peter-mw commented on July 17, 2024

Thanks i will look at this, It can be useful in my case

Anyways... its better to use one file lib for Markdown than 100 files lib if they do the same and the 1 file lib is faster

from laravel-markdown.

GrahamCampbell avatar GrahamCampbell commented on July 17, 2024

Only if you use it on most of the requests. There is still an overhead for php every time it has to process a file. If it's large an unused, you could end up with slower performance.

from laravel-markdown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.