Replies: 3 comments 4 replies
-
Could you please create a pull request. |
Beta Was this translation helpful? Give feedback.
1 reply
-
@Serraset since I'm not a Lua expert and @jberkel doesn't seem to be available, can you add the PRs by yourself? |
Beta Was this translation helpful? Give feedback.
1 reply
-
If possible, integrate your reusable behavior model into the existing wiki model. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am using bliki for a research project called DBnary. For this project, I extract Lexical data from 21 editions of wiktionary. I use bliki to parse and transcode definitions and morphological information.
When auditing my project, I saw that bliki add a huge impact on performance, and especially when using Lua modules.
I found that I was spending most of my time initializing ScribuntoLuaEngine instances (which is done for every #invoke to a Lua function by bliki).
In bliki, a ScribuntoLuaEngine is created for each invocation. Creation of such an engine takes a lot of time.
I wanted to reuse a scribuntoLuaEngine for the whole extraction process (to handle thousands of pages) rather than creating a new one for each invocation or for each page. This did not initially work because Scribunto assumes it is initialized for each query, i.e. it is initialized once for each page. In fact, this assumption is used only in mw.title.lua, where the getPageName function is created using the pagename passed at initialisation time.
I tried to inject code that will void these assumptions, but it was not possible, then I patched the mw.title.lua (I am assuming that this part of scribunto code is now very stable).
With this patched bliki version, I was able to reuse the ScribuntoLuaEngine instance accross pages and cut down the extraction time for english from 3 hours to 30 minutes. The only caveat is that template calls should not be cached (or the cache should be emptied when setPageName is called.
If you want to have a look at the impact on your code, please have a look to https://bitbucket.org/serasset/info.bliki.wiki/branch/bump-for-dbnary
If you are interested in this improvement, I can help reintegrating it to bliki.
Regards,
Gilles Sérasset,
Beta Was this translation helpful? Give feedback.
All reactions