Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • pleroma pleroma
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 647
    • Issues 647
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 86
    • Merge requests 86
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PleromaPleroma
  • pleromapleroma
  • Issues
  • #481
Closed
Open
Issue created Dec 26, 2018 by lain@lambadalambdaOwner

HTML sanitization is too slow

With a post that contains 4999 newlines and one character, the resulting html will contain nearly 5000 <p></p> pairs.

To display this post, my i5-8350U CPU @ 1.70GHz will take around 250ms. This time is mostly spent in HTML.filter_tags, removing it from ActivityView.ex (line 248) speeds it up to normal levels (< 5ms).

Overall, I think we need a faster library for sanitation, but for now it might also be alright to just cache html for a while to prevent accidental DDOSing.

Assignee
Assign to
Time tracking