dokuwiki-template-bootstrap3 icon indicating copy to clipboard operation
dokuwiki-template-bootstrap3 copied to clipboard

bootstrap3-template takes 10 times longer to load pages than dokuwiki-template for large pages

Open virk opened this issue 4 years ago • 7 comments

Large pages take long time to load

Normally we are using bootstrap3-template. Currently I have investigated that with very large pages with a lot of includes inside it takes 10 times longer until they are displayed if I use bootstrap3-template compared to dokuwiki-template and compared to about 5 other templates; I already "had to" increase "max_execution_time" in php.ini from 30 to 60 in order to not run into a time-out. If a page of that size just contains text time differences are not that noticeable.

Has somebody got any similar experience and/or can guide me what I can do to investigate the "problem" further?

Sorry, there is a bug label added to this post. This was not the intention. How can I delete it?

virk avatar Aug 09 '19 05:08 virk

Hi @virk, Bootstrap3 have an internal parser for convert some DokuWiki HTML output in Bootstrap compliant output and sometimes is slow with long pages.

What's your DokuWiki and template version ? Your Wiki is online ? It's possible to have the source of the slower page ?

Dont' worry, the label is automatically added by GitHub. I've just removed this tag.

Joseph

giterlizzi avatar Aug 09 '19 09:08 giterlizzi

Hi Joseph!

The wiki is an internal one and currently I cannot grant any access. Dokuwiki is Greebo (up to date) and bootstrap3 also up to date. Some further information:

The page is just the following:

====== 2789 Heading ======
{{namespace>projekte:2751_2800:2789&depth=1}}

But the namespace 2789 contains about 200 small pages which are included automatically via the include-plugin and by the above mentioned {{namespace>projekte:2751_2800:2789&depth=1}}

Most of these about 200 pages look like the following:

==== 09.08.2019 ====
  * Phone call with Mr. X done. He agrees, that this was best joke ever.
  * Answer sent to Mrs. Y. She wants to
  * Additional approx. 10 lines

Some of these 200 pages also contain some data-table and/or some pictures.

When I press reload the page gets blank and the text gets visible back after approx. 35 seconds. (I increased "max_execution_time").

On another (faster) machine (mac mini late 2014 Mojave, php 7.1.23) I tested with loadskin-plugin and "reload" via click on the breadcrumb the following:

  • Bootstrap3 15 sec
  • bootie, dokuwiki, ghw, monochrome, sprintdoc, twentyfifteen, arctic (here text did not disappear at all). All these reloads took about 2 seconds, some slightly more, some less
  • Bootstrap3 12 sec

When I look into the web-information during this reload phase it seems, that everything is loaded within milliseconds but the "projekte:2751_2800:2789" takes 13 seconds. To me it seems that httpd is busy 100% during that period.

To be mentioned is "If a page of that size just contains text time differences are not that noticeable."

If you have any idea what I can further support with kindly let me know!

virk avatar Aug 09 '19 10:08 virk

Hello, I have same behaviour on my setup. I'm running dokuwiki on LAMP setup inside Proxmox>LXC container. Recently I've moved dokuwiki directory to glusterfs storage. TTFB is now between 3 and 6 seconds. When files are local to container, it was like 150ms. If I switch from bootstrap3 to dokuwiki theme, it rarely reach 1s TTFB. So, yes, moving from local to glusterfs has a cost, but using bootstrap3 theme, it becomes inusable. We are using sidebar to navigate namespaces. So I need simple navi plugin at least...

survietamine avatar Aug 21 '19 12:08 survietamine

There are news from my side: I installed Catalina macOS with php 7.3.8. With this combination the wiki with bootstrap3-template gets fast again. I do not know what it is due to but with php 5.6.30 or 7.1.23 it is still that slow as written in my initial post.

virk avatar Oct 16 '19 06:10 virk

edit: fixed by installing php-xml for 7.3

FYI: On ubuntu 18.04, after installing php-fpm-7.3, the search functionality breaks.

2019/10/16 10:06:16 [error] 12763#12763: *5 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function dokuwiki\template\bootstrap3\simplexml_load_file() in /var/www/REDACTED.wiki/lib/tpl/bootstrap3/Template.php:2502
Stack trace:
#0 /var/www/REDACTED.wiki/lib/tpl/bootstrap3/Template.php(98): dokuwiki\template\bootstrap3\Template->normalizeContent('<h1 class="sect...')
#1 /var/www/REDACTED.wiki/inc/events.php(229): dokuwiki\template\bootstrap3\Template->contentHandler(Object(Doku_Event), NULL)
#2 /var/www/REDACTED.wiki/inc/events.php(70): Doku_Event_Handler->process_event(Object(Doku_Event), 'BEFORE')
#3 /var/www/REDACTED.wiki/inc/events.php(106): Doku_Event->advise_before(true)
#4 /var/www/REDACTED.wiki/inc/events.php(256): Doku_Event->trigger('ptln', true)
#5 /var/www/REDACTED.wiki/inc/template.php(85): trigger_event('TPL_CONTENT_DIS...', '\n<h1 class="sec...', 'ptln')
#6 /var/www/REDACTED.wiki/lib/tpl/bootstrap3/main.php(109): tpl_content(false)
#7 /var/www/REDACTED.wiki/inc/actions.php(27): include('/var/www/smirno...')
#8 /var/www" while reading upstream, client: 73.222.1.29, server: REDACTED.wiki, request: "GET /doku.php?id=start&do=search&q=test HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.3-fpm.sock:", host: "REDACTED.wiki"

issmirnov avatar Oct 16 '19 17:10 issmirnov

@issmirnov, seems you don't have php-xml package installed

giterlizzi avatar Oct 17 '19 11:10 giterlizzi

@giterlizzi thanks, I had installed it for 7.2 but not 7.3. Happy to report this fixes the crash seen. However, my benchmarking shows no speed improvement between the two PHP versions.

issmirnov avatar Oct 20 '19 18:10 issmirnov