![]() We go from around 1s for a request to (100ms-300ms). If we patch the libzim to give a dummy text instead of get the content and generate the snippet, we earn a lot. It seems that most of the time is spend not doing the search, but get the article content to generate the snippet used in the result html page. With the option -nosearchbar the difference between what we measure on kiwix-serve side and puppeteer is under 300ms. In real life, this is probably reduced by the browser cache system (and a apache proxy if possible). Then the full puppeteer request (download+rendering+.) is reduced by 1.5s. The search result is a plain html page without any sub-elements to download. If we launch kiwix-serve with -nosearchbar. This overhead is not on kiwix-serve and we cannot do a lot about this.Īll sub-requests are dues to the search bar. But when measuring puppeteer request, it took more than 2s per page. When measuring all the time need by all request to render one page, kiwix-serve takes around 1.3s to handle all requests(9). Handling this and doing the layout takes time. When it does a request to a search page, it also interpret the content and do sub-request if needed (image, css, js). console.log(pageBody) // outputs a lot of textĮxecStart=/opt/iiab/kiwix/bin/kiwix-serve -daemon -port 3000 -nolibrarybutton -library /library/zims/library.xml -urlRootLocation=/kiwix/Īfter investigating, there is several things: const h1 = await page.evaluate(() => 1.innerHTML) tMaxListeners(Infinity) // avoid max listeners warningįor (let i = 0 i ) '/kiwix/search?content=wikipedia_es_all_maxi_2019-09&pattern=pueblo+' ![]() '/kiwix/search?content=wikipedia_es_all_maxi_2019-09&pattern=gastronomia+', '/kiwix/search?content=wikipedia_es_all_maxi_2019-09&pattern=juego+', '/kiwix/search?content=wikipedia_es_all_maxi_2019-09&pattern=nuevo+', '/kiwix/search?content=wikipedia_es_all_maxi_2019-09&pattern=pais+', '/kiwix/search?content=wikipedia_es_all_maxi_2019-09&pattern=gobierno+', '/kiwix/search?content=wikipedia_es_all_maxi_2019-09&pattern=amlo+', '/kiwix/search?content=wikipedia_es_all_maxi_2019-09&pattern=futbol+', '/kiwix/search?content=wikipedia_es_all_maxi_2019-09&pattern=mexico+', RandomUrl = host + '/kiwix/random?content=wikipedia_es_medicine_maxi_2019-11' ![]() Teachers are habituated to expect search results within 1-to-2 seconds similar to Google on their smartphones so it's a fact that they get very confused when nothing happens for 30 seconds!. ![]()
0 Comments
Leave a Reply. |