public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Kolen Cheung <christian.kolen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Markdown for AMP Project https://www.ampproject.org/
Date: Tue, 2 May 2017 18:15:49 -0700 (PDT)	[thread overview]
Message-ID: <8fe02f4f-a2e4-4c86-ad1c-3fc90cdfdb72@googlegroups.com> (raw)
In-Reply-To: <20170502212420.GB3957-vvHXCvOI15V+RnA8QueWCFaTQe2KTcn/@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 3883 bytes --]

Yes, pandoc is not optimized for speed and memory use but extensibility. If 
there's no feature you need in pandoc, there probably be better solutions 
out there. I know that MultiMarkdown is highly optimized in C too. But I 
don't know how it compares to Discount.

On the other hand, for some of us, sticking with pandoc is way easier in 
terms of extensibility and "future compatibility". And regarding 
performance, depending on your project size and the amount of new contents 
you are creating, that might be irrelevant. e.g. if you use makefile to 
build your project (or any other build system like Jekyll), it will not 
rebuild targets that's already been built and not updated. And then you can 
always do something like `make -j` to build in parallel. And lastly, if you 
are building static pages, generation speed is usually not too important 
unless your project is really really huge.

It sounds like your project is kind of large scale and want to be as 
optimized as possible (in terms of page rank, rendering speed, etc.). So if 
you describe more about your use case, we might be able to give better 
advice.

By the way, I almost forgot to mention, @jgm has mentioned that if you use 
commonmark output from pandoc, it will be much faster. If you don't need 
the extra features pandoc markdown has in addition to those in commonmark, 
you might give it a try and see if its performance satisfies you.

P.S. I has a friend who was mentored by a Haskell language designer, and he 
once said "coding in Haskell is trading time for correctness". And that's 
exactly why pandoc can handle such complexity with relative ease (@jgm has 
praised Haskell's compiler in order for him to handle this complexity).

On Tuesday, May 2, 2017 at 2:28:58 PM UTC-7, supp...-ZohPw8X7yHTQT0dZR+AlfA@public.gmane.org wrote:
>
> On Tue, May 02, 2017 at 02:09:50PM -0700, mb21 wrote: 
> > @Jean, you know you can specify image sizes in pandoc as well, right? 
> see 
> > http://pandoc.org/MANUAL.html#images 
>
> I see that, it is nice usable tool and I use it. I also use Pandoc to 
> convert HTML to text, at least temporarily, as it may show HTTP links 
> within the text body, which is nice feature. 
>
> Before I was using elinks browser with --dump option, and links appear 
> then on the bottom of the page. 
>
> However, it is not as good for my production and the website revision 
> system with hundreds (thousands) of markdown pages, as it is too 
> slow. 
>
> If I add AMP pages, that means there is double number of pages to 
> process. Pandoc is not thinkable for the large work, after short 
> review and stupid benchmark below. 
>
> time lisp -x '(loop for i from 1 to 1000 do (shell "pandoc -f markdown -t 
> html  tmp/benchmark.md > /dev/null" ))' 
>
> NIL 
>
> real    2m30.604s 
> user    2m13.572s 
> sys     0m10.972s 
>
>
> time lisp -x '(loop for i from 1 to 1000 do (shell "discount_markdown tmp/
> benchmark.md > /dev/null" ))' 
> NIL 
>
> real    0m6.388s 
> user    0m0.060s 
> sys     0m0.056s 
>
> the difference should be very obvious. Discount markdown is way better 
> for markdown, while Pandoc is way better for general purpose 
> conversions and is too slow for huge collection of markdown pages. 
>
> Discount markdown: www.pell.portland.or.us/~orc/Code/discount/ 
>
> Jean 
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/8fe02f4f-a2e4-4c86-ad1c-3fc90cdfdb72%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 6522 bytes --]

  parent reply	other threads:[~2017-05-03  1:15 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-29 13:49 support1-ZohPw8X7yHTQT0dZR+AlfA
     [not found] ` <74722d2b-3362-48e3-a0b4-fa4502bc8005-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-04-29 23:04   ` Kolen Cheung
     [not found]     ` <436da55e-15b1-4571-8716-bc35ae061e22-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-04-30  0:01       ` support1-ZohPw8X7yHTQT0dZR+AlfA
     [not found]         ` <3ec5c6ae-f370-4c7f-a582-319ca909ede9-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-04-30  0:26           ` Kolen Cheung
     [not found]             ` <ca2d1fee-a395-490e-a5e2-8d1142691356-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-04-30  0:28               ` Kolen Cheung
     [not found]                 ` <aefedaf2-8b5f-48a4-ab4f-b64ef59390f7-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-04-30  1:07                   ` Kolen Cheung
2017-04-30  5:42   ` support1-ZohPw8X7yHTQT0dZR+AlfA
     [not found]     ` <c45270dd-d9c6-4ac8-9d1d-84652642bc6b-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-04-30 22:07       ` Kolen Cheung
     [not found]         ` <886bb176-054d-4e41-ba2e-7058e30ad355-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-05-01  6:54           ` support1-ZohPw8X7yHTQT0dZR+AlfA
2017-05-01  7:04           ` support1-ZohPw8X7yHTQT0dZR+AlfA
     [not found]             ` <382a2f59-fca3-4409-8b05-10bd7e884a70-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-05-01 11:13               ` Albert Krewinkel
     [not found]                 ` <87fugosud3.fsf-NJ6QtbQ9hATDZamjJ9D3v6C1jgCzLlUE@public.gmane.org>
2017-05-01 12:48                   ` RCDRUN
2017-05-01 16:39               ` Fernando Botelho
     [not found]                 ` <01c43386-de61-d9c5-7db0-9e422e7aeddd-mxjLRozsjzA@public.gmane.org>
2017-05-01 17:14                   ` RCDRUN
     [not found]                     ` <20170501171417.GA2499-vvHXCvOI15V+RnA8QueWCFaTQe2KTcn/@public.gmane.org>
2017-05-02 21:09                       ` mb21
     [not found]                         ` <a1643278-9ec1-46a7-80d8-c0238b5b9f22-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-05-02 21:24                           ` support1-ZohPw8X7yHTQT0dZR+AlfA
     [not found]                             ` <20170502212420.GB3957-vvHXCvOI15V+RnA8QueWCFaTQe2KTcn/@public.gmane.org>
2017-05-03  1:15                               ` Kolen Cheung [this message]
     [not found]                                 ` <8fe02f4f-a2e4-4c86-ad1c-3fc90cdfdb72-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-05-03  8:31                                   ` support1-ZohPw8X7yHTQT0dZR+AlfA
     [not found]                                     ` <20170503083101.GE15640-vvHXCvOI15V+RnA8QueWCFaTQe2KTcn/@public.gmane.org>
2017-05-03 19:23                                       ` Kolen Cheung
     [not found]                                         ` <b7a15adb-8e28-4d0a-9aa5-7c77b4f4f4eb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-05-03 20:36                                           ` support1-ZohPw8X7yHTQT0dZR+AlfA
     [not found]                                             ` <20170503203659.GD11153-vvHXCvOI15V+RnA8QueWCFaTQe2KTcn/@public.gmane.org>
2017-05-04  4:52                                               ` Kolen Cheung
     [not found]                                                 ` <e69fce56-6677-4918-830e-ffe4fcd60cb0-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-05-04  8:22                                                   ` support1-ZohPw8X7yHTQT0dZR+AlfA
     [not found]                                                     ` <20170504082251.GC14964-vvHXCvOI15V+RnA8QueWCFaTQe2KTcn/@public.gmane.org>
2017-05-04 19:27                                                       ` Kolen Cheung
     [not found]                                                         ` <b9d11088-d6ac-432b-8206-03e1962d66a1-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-05-22  6:44                                                           ` Kolen Cheung
2017-05-03  9:47                               ` John MacFarlane
     [not found]                                 ` <20170503094738.GB17566-BKjuZOBx5Kn2N3qrpRCZGbhGAdq7xJNKhPhL2mjWHbk@public.gmane.org>
2017-05-03 10:09                                   ` support1-ZohPw8X7yHTQT0dZR+AlfA
     [not found]                                     ` <20170503100958.GB1547-vvHXCvOI15V+RnA8QueWCFaTQe2KTcn/@public.gmane.org>
2017-05-03 10:28                                       ` John MacFarlane
     [not found]                                         ` <20170503102852.GF17566-BKjuZOBx5Kn2N3qrpRCZGbhGAdq7xJNKhPhL2mjWHbk@public.gmane.org>
2017-05-03 11:09                                           ` RCDRUN
2017-05-01 17:14                   ` RCDRUN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8fe02f4f-a2e4-4c86-ad1c-3fc90cdfdb72@googlegroups.com \
    --to=christian.kolen-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).