#7889 Improve markdown logic for cached vs threshold limits

v1.3.1
closed
General
2015-06-29
2015-06-04
No

The markdown_render_max_length param is an absolute limit to how big something can be for markdown conversion. But cached_convert() was added later and is a better approach. E.g. a very large ticket only has to get converted once and then its good, so a markdown_render_max_length isn't needed (we even have it set very high in development.ini because of this).

However, not all markdown conversions go through cached_convert(), for example, commit messages, outbound email bodies, or markdown files in repos.

So we should have markdown_render_max_length apply only to non-cached conversions and change its default value to something not so extremely high, maybe 100000. Or possibly introduce a second option, one for cached and one for non-cached conversions. Or develop a new caching mechanism that works for markdown text that isn't part of an artifact.

An example I came across was thousands of lines like this in the commit message itself, totaling around 500k chars:

   renamed: ts/5.1/fastboot/fastboot-mangle -> ts/5.2/fastboot/fastboot-mangle                                                                                                                             
   renamed: ts/5.1/fastboot/lib-boot -> ts/5.2/fastboot/lib-boot                                                                                                                                           
   renamed: ts/5.1/fastboot/lib-rw -> ts/5.2/fastboot/lib-rw                                                                                                                                               
   renamed: ts/5.1/fastboot/usr-rw -> ts/5.2/fastboot/usr-rw                                                                                                                                               
   renamed: ts/5.1/kernel/alias/acpi -> ts/5.2/kernel/alias/acpi                                                                                                                                           
   renamed: ts/5.1/kernel/alias/pcm -> ts/5.2/kernel/alias/pcm              

Discussion

  • Dave Brondsema

    Dave Brondsema - 2015-06-15
    • labels: performance --> performance, sf-current, sf-2
     
  • Heith Seewald

    Heith Seewald - 2015-06-15
    • assigned_to: Heith Seewald
     
  • Heith Seewald

    Heith Seewald - 2015-06-15

    Lowered the overall limit from 999999999 to 100k. Added a parameter to ForgeMarkdown.convert to bypass the char limit.

    QA at hs/7889

     
  • Heith Seewald

    Heith Seewald - 2015-06-15
    • status: open --> review
     
  • Dave Brondsema

    Dave Brondsema - 2015-06-16
    • status: review --> closed
    • Reviewer: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2015-06-29
    • labels: performance, sf-current, sf-2 --> performance, sf-2
     
  • Dave Brondsema

    Dave Brondsema - 2015-08-10
    • Milestone: unreleased --> v1.3.1
     

Log in to post a comment.