Skip to content

Jekyll/Liquid generation is dead-slow because of tutorial ToC #607

Closed
@dragos

Description

@dragos

All the time is spent in several nested loops computing the table of contents for tutorials. Unfortunately Liquid is a pretty poor language so there aren't any obvious workarounds, but it's definitely worth investigating. Once I commented those loops times went down to around 1s.

Maybe a solution using categories or tags would reduce the number of iterations (350 pages, but only 33 are part of the Scala tour).

$ bundle exec jekyll serve --profile --incremental
Configuration file: /Users/dragos/workspace/git/scala.github.com/_config.yml
            Source: /Users/dragos/workspace/git/scala.github.com
       Destination: /Users/dragos/workspace/git/scala.github.com/_site
 Incremental build: enabled
      Generating... 
    Liquid Warning: Liquid syntax error (line 164): Unexpected character { in "{{{` and `}}" in overviews/scaladoc/for-library-authors.md

Filename                                                           | Count |     Bytes |    Time
-------------------------------------------------------------------+-------+-----------+--------
_layouts/tutorial.html                                             |   132 | 20395.38K | 202.110
_includes/tutorial-tour-list.txt                                   |   133 | 18740.42K | 197.912
_includes/tutorial-toc.txt                                         |   132 | 18618.52K | 196.613
_layouts/overview-large.html                                       |   164 | 24041.61K | 151.205
_includes/toc-large.txt                                            |   164 | 20639.72K | 144.796
tutorials/index.md                                                 |     1 |   184.98K |   1.759
_layouts/overview.html                                             |    36 |  1177.23K |   1.444
es/overviews/index.md                                              |     1 |    41.87K |   0.729
_includes/localized-overview-index.txt                             |     1 |    41.71K |   0.728
_includes/header.txt                                               |   369 |  1777.55K |   0.456

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions