Subramanya Sastry has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/258469

Change subject: Some more tweaks to the parsing limits patch
......................................................................

Some more tweaks to the parsing limits patch

* Reduce list item default limit to 30K
* Turned off transclusion limits since they are being reparsed
  in a <td> scenario causing them to be double-counted.

Change-Id: Ib21b152b239b1262778aa9dcb0081ceaccf35867
---
M lib/config/ParsoidConfig.js
M lib/wt2html/pegTokenizer.pegjs.txt
2 files changed, 8 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/69/258469/1

diff --git a/lib/config/ParsoidConfig.js b/lib/config/ParsoidConfig.js
index 976042a..1e03578 100644
--- a/lib/config/ParsoidConfig.js
+++ b/lib/config/ParsoidConfig.js
@@ -77,22 +77,24 @@
                parsoidCacheReq: 0,
        },
 
-       // SSS FIXME: Somewhat arbitrary numbers for starters.
-       // If these limits are breached, we return a http 500.
+       // Somewhat arbitrary numbers for starters.
+       // If these limits are breached, we return a http 413 (Payload too 
large)
        limits: {
                wt2html: {
                        // We won't handle pages beyond this size
                        maxWikitextSize: 1000000, // 1M
 
                        // Max list items per page
-                       maxListItems: 40000,
+                       maxListItems: 30000,
 
                        // Max table cells per page
                        maxTableCells: 30000,
 
+                       // DISABLED for now
                        // Max transclusions per page
                        maxTransclusions: 5000,
 
+                       // DISABLED for now
                        // Max images per page
                        maxImages: 1000,
 
diff --git a/lib/wt2html/pegTokenizer.pegjs.txt 
b/lib/wt2html/pegTokenizer.pegjs.txt
index 9524262..a51f0ed 100644
--- a/lib/wt2html/pegTokenizer.pegjs.txt
+++ b/lib/wt2html/pegTokenizer.pegjs.txt
@@ -658,7 +658,9 @@
       // again.
       params.unshift(new KV(tu.flattenIfArray(target.tokens), '', 
target.srcOffsets));
       var obj = new SelfclosingTagTk('template', params, { tsr: tsrOffsets(), 
src: text() });
-      env.bumpParserResourceUse('transclusion');
+      // FIXME: Turn this off for now since this is being double-counted
+      // when a transclusion is used inside a <td>.
+      // env.bumpParserResourceUse('transclusion');
       return obj;
     }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/258469
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib21b152b239b1262778aa9dcb0081ceaccf35867
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <ssas...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to