Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
pagedjs
pagedjs
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 154
    • Issues 154
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 12
    • Merge Requests 12
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Tools
  • pagedjspagedjs
  • Issues
  • #109

Closed
Open
Opened Apr 01, 2019 by detche@detche
  • Report abuse
  • New issue
Report abuse New issue

Reduction of the per-page layout time growth

Hi!

I noticed that the time to create the layout of a page grows with the amount of pages that were processed already. I've been experimenting with a rather large document and this increase can make a whole build take a really long time.

Perhaps this is something that has to do with my input document? Are there any general tips on how the input document/css rules should be structured in order to reduce this growth?

Mine looks like this:

body
    section.cover
    section.toc
    section
        h1
        section
            h2
            [content...]
        section
            h2
            [content...]
        ...
    ...

[content...] being paragraphs and divs (with KaTeX rendered math)

As a side note, I've ran a profiling session with the Chrome dev tools. It turns out that commenting out this line really helps bringing down the increase, enough so to reduce my 2hours+ build to ~25min. Indeed the modification of the pages root element's style appears to cause a "restyle" browser task for the whole document, for each page added. That restyle happens when this line is executed. I am unsure of the use of this variable (I've found it there only), I could not find any visual change on my document after disabling it. Is it safe to do so?

Thanks for your time on this project, by the way!

Edited Apr 01, 2019 by detche
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
1
Labels
performance
Assign labels
  • View project labels
Reference: tools/pagedjs#109