Content deleted Content added
Sohom Datta (talk | contribs) |
|||
Line 458:
:@[[User:Aidan9382|Aidan9382]]It feels counter-intuitive to import over a whole module to see a slight performance gain, maybe you could copy over only the relevant parts ? and replace the gsub code ? [[User:Sohom Datta|<b class="skin-invert" style="color:#795cb2; display: inline-block; transform: rotate(1deg)">Sohom</b>]] ([[User talk:Sohom Datta|<span class="skin-invert" style="color: #36c;">talk</span>]]) 14:56, 22 January 2025 (UTC)
::{{ping|Sohom Datta}} The entire point of the module used is that "doing it fast" is an involved process, since there's no gsub that can reasonably capture both nowiki and html comments at the same time, so you instead have to do some rather involved matching to do it in just one scan of the content. Copying over the relevant parts is something I want to directly avoid because it's a decent chunk of code and duplicating it everywhere would get incredibly messy fast, and that's why I made that module in the first place. And I don't get what you mean by "replacing the gsub code", since that's what the module is doing here, so I've already done that(?). Not quite sure what you mean there. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 15:23, 22 January 2025 (UTC)
:::Fair enough, but my primary concern is that we are transforming a slightly slow but maintainable and readable module into one that requires specialized Lua knowledge to debug. By introducing a dependency on a highly complex and intricate module, we risk increasing the likelihood that errors related to <code>PrepareText</code> will be hard to debug for passing administrators and instead demand the expertise of someone really familiar with the inner working of the Wikitext parsing module. [[User:Sohom Datta|<b class="skin-invert" style="color:#795cb2; display: inline-block; transform: rotate(1deg)">Sohom</b>]] ([[User talk:Sohom Datta|<span class="skin-invert" style="color: #36c;">talk</span>]]) 16:58, 22 January 2025 (UTC)
|