From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/17538 Path: news.gmane.org!.POSTED!not-for-mail From: support1-ZohPw8X7yHTQT0dZR+AlfA@public.gmane.org Newsgroups: gmane.text.pandoc Subject: Re: Markdown for AMP Project https://www.ampproject.org/ Date: Wed, 3 May 2017 11:31:01 +0300 Message-ID: <20170503083101.GE15640@protected.rcdrun.com> References: <74722d2b-3362-48e3-a0b4-fa4502bc8005@googlegroups.com> <886bb176-054d-4e41-ba2e-7058e30ad355@googlegroups.com> <382a2f59-fca3-4409-8b05-10bd7e884a70@googlegroups.com> <01c43386-de61-d9c5-7db0-9e422e7aeddd@F123.org> <20170501171417.GA2499@protected.rcdrun.com> <20170502212420.GB3957@protected.rcdrun.com> <8fe02f4f-a2e4-4c86-ad1c-3fc90cdfdb72@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1493800545 5055 195.159.176.226 (3 May 2017 08:35:45 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 3 May 2017 08:35:45 +0000 (UTC) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDT3JGEATELRBXNMU3EAKGQERDWSBBI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed May 03 10:35:39 2017 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-wr0-f188.google.com ([209.85.128.188]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d5pl3-00018q-82 for gtp-pandoc-discuss@m.gmane.org; Wed, 03 May 2017 10:35:37 +0200 Original-Received: by mail-wr0-f188.google.com with SMTP id o52sf11603291wrb.1 for ; Wed, 03 May 2017 01:35:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=x4RB3ow1NCOW5awRJImtAaaqnjjbRipML2biExB5RF8=; b=Fep9gLX9Yy4hJ03YXqtkZjEW5/CYDUyekagxQE/Jx0ltWzV4Q0eUEoW32ylRiErCBC Q5TrIiVXjQFiuyqykSyi64hpPCMng1LwGHNeIdo6N/a/2jwAghO6AaeNAXw0mkjT1Q2H uRHJ4pjQ9ykNaXC++nG3r+i8p1lppEU66WoD/3NVJEfU3cnkqv1T4p85Ee+2fULH+88w 1/7fSHjPaYbpBwBRUXuo0/QW9UTfuYIQq0gEH8ItFNw7aiHdajd/CISEKyP4ihJ4FcZR j20BroI/92deD2as5txdnfqNbnilEwCftkGNqr2Gi1u1CbY7UrEpNW/Fywpys63QLhO8 9Hcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:subject:message-id :references:mime-version:content-disposition:in-reply-to :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=x4RB3ow1NCOW5awRJImtAaaqnjjbRipML2biExB5RF8=; b=gk8R4hB/HJIMvA2O6HHuw1qBDYHMkuzNnC0rDCasItn8T7t9JGs4HahKBWJUJTXsWL 34Nou/Vd7FyKiS7ds63UhHo69j1mu6eVCvKcHLSKIwwCYqsHr49iGx/medzD6sIC71TX Sum1ORUYNtA8Fnh2AnpoQp40f3OoqUhHuIwXUIVxyiH3bl5+1IWRQppS7W6KCcNstq0m +o9ZujsoRq/L054+OlHzj0n/QWBRJFypB3UfxhNGN/mHUKqXBXG9Z5ftczjqdL/v2nFo uhR1GY+OXSwG+RWXQhxlaYlNtGWEnbdOj+TQMPoicMFMFgSm7D/LSe6jPs/hXYIt/z5K LE Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AN3rC/7I8eU36QvrLy6XPJYIOPJ3LcBheM6jr+CJw4cFYxf1kbHjYVp9 pqgOVPGLAxZf3g== X-Received: by 10.25.209.138 with SMTP id i132mr50555lfg.18.1493800543175; Wed, 03 May 2017 01:35:43 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.46.83.71 with SMTP id t7ls87077ljd.18.gmail; Wed, 03 May 2017 01:35:41 -0700 (PDT) X-Received: by 10.25.24.84 with SMTP id o81mr831160lfi.9.1493800541418; Wed, 03 May 2017 01:35:41 -0700 (PDT) Original-Received: from stw1.rcdrun.com (stw1.rcdrun.com. [217.170.207.13]) by gmr-mx.google.com with ESMTPS id w126si250035wmd.1.2017.05.03.01.35.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 May 2017 01:35:41 -0700 (PDT) Received-SPF: pass (google.com: domain of support1-ZohPw8X7yHTQT0dZR+AlfA@public.gmane.org designates 217.170.207.13 as permitted sender) client-ip=217.170.207.13; Original-Received: from protected.rcdrun.com (localhost [::1]) (AUTH: PLAIN securesender, TLS: TLSv1/SSLv3,256bits,AES256-SHA) by stw1.rcdrun.com with ESMTPSA; Wed, 03 May 2017 01:36:28 -0700 id 00000000001654D9.000000005909968D.00005200 Original-Received: from localhost (localhost [127.0.0.1]) (uid 1001) by protected.rcdrun.com with local; Wed, 03 May 2017 11:31:01 +0300 id 0000000000123E8C.0000000059099545.00005CA7 Content-Disposition: inline In-Reply-To: <8fe02f4f-a2e4-4c86-ad1c-3fc90cdfdb72-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: support1-ZohPw8X7yHTQT0dZR+AlfA@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of support1-ZohPw8X7yHTQT0dZR+AlfA@public.gmane.org designates 217.170.207.13 as permitted sender) smtp.mailfrom=support1-ZohPw8X7yHTQT0dZR+AlfA@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.org gmane.text.pandoc:17538 Archived-At: Thank you. On Tue, May 02, 2017 at 06:15:49PM -0700, Kolen Cheung wrote: > 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. time lisp -x '(loop for i from 1 to 1000 do (shell "pandoc -f commonmark -t html tmp/benchmark.md > /dev/null" ))' NIL real 0m39.957s user 0m24.160s sys 0m8.036s pandoc with commonmark is way faster, I see, still about 6 times slower than discount markdown, but good to know it. Thank you, I will use it. The test with multimarkdown is little faster than pandoc, yet slower than discount markdown: time lisp -x '(loop for i from 1 to 1000 do (shell "./multimarkdown ~/tmp/benchmark.md > /dev/null" ))' NIL real 0m17.655s user 0m11.856s sys 0m0.284s > 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. Yes, only no. I use database, multiple templates and variable expansion. Static html is generated with the dynamic content produced by database and website revision system. That means some websites are updated daily, with prices updated. > And lastly, if you are building static pages, generation speed is > usually not too important unless your project is really really huge. I am updating too often, making new content, and multiple related pages reflecting new content on one page are updated, so speed is always relevant. I don't know for you and other people, but I don't like waiting on program execution, even a second is sometimes too long, depending on what I am doing. > 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. Yes, who does not want the optimizations. For advise, if you know how to make this line compatible with pandoc, let me know. This way I am providing image sizes to discount markdown, and image size features are not compatible between markdown varieties, and pages don't validate without it. ![dreamstime_xxl_35121976.jpg](http://example.com/images/depository/panama/dreamstime_xxl_35121976.jpg =2048x1365 "dreamstime_xxl_35121976.jpg") Then I could use pandoc to generate PDF and other complementary formats relating to pages. > 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. Yes it is few times faster, true. Yet slower then both discount markdown and multimarkdown. > 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). There is high burden to install the Haskell and all compatibilities required for pandoc -- so it is not really necessarily for me. And I cannot even compile from source, it is such a huge trouble to compile it from source, you would not believe it. I would need to go back to earliest versions of Haskell, and compile it version by version to the present time, I mean -- no. It is easy for those who use distributions, I don't use and it hard to understand why pandoc has this much of underlying required software, it is really huge in size. No, I don't want to know. Pandoc is good, but for me not as fast to generate pages. Jean