How to solve the time-consuming problem of pug rendering pages?

layout.pug Code:

doctype html
html
    head
        meta(charset="UTF-8")
        title -sharp{title}
        link(rel="stylesheet" href="xxx.css")
        link(rel="stylesheet" href="xxx.css")
        
        block links
        
        script(type="text/javascript" src="xxx.js")
    body
        
        include header
        
        include ../Include/homeInclude
        include ../Include/modals
        include ../Include/userInfoComponent
        include ../Include/page
        .contain_box
            block content
        
        include footer
        
        +modal_a
        +modal_b
        +modal_c
        
        block scripts
        
        script(type="text/javascript", src="xxx.js")
    

Index.pug Code:

extends ../Shared/layout.pug

block links
    
block scripts
    
block content
    .box_content
        include ../Include/worksList
        +worksList
        +page(0)

sometimes it takes about 3 seconds for a page to render:



Mar.14,2021
Menu