Re: [Wikitech-l] Editing module in the wiki editor lead to overloading resouces of processor

2017-10-30 Thread Bartosz Dziewoński

When you next experience the issue, you can try to debug it:

0. You should be viewing the page using MediaWiki's debug mode to make 
the results easier to interpret (add =1 to the page address). Note 
that this will make pages load slower.
1. Open the Firefox developer tools (Ctrl+Shift+I, or Tools → Web 
Developer → Toggle Tools).

2. Switch to the "Debugger" tab.
3. Click the "Pause" button.

Screenshot: https://phabricator.wikimedia.org/F10524704 (this is Firefox 
57 on Windows 10, but the layout should be similar everywhere)


This will pause the execution of JavaScript on the page and reveal the 
script that was executing (if nothing is currently executing, it will 
pause at the beginning of the next function to execute). You can 
right-click the file name to copy/reveal the full path of the script.


For example, in this screenshot the execution paused inside the code to 
toggle the blinking cursor in the CodeMirror editor: 
https://phabricator.wikimedia.org/F10524713


(Please also take a screenshot of the entire debugger when filing a task 
about this, the "Call stack" on the right is very useful if the script 
itself is large.)


Afterwards click the "Resume" button (in the same location as "Pause") 
to let the page continue executing. Try doing this a few times, in case 
multiple scripts are running, to increase the chance of seeing each one.



--
Bartosz Dziewoński

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Editing module in the wiki editor lead to overloading resouces of processor

2017-10-30 Thread Brad Jorsch (Anomie)
On Mon, Oct 30, 2017 at 8:18 AM, mathieu stumpf guntz <
psychosl...@culture-libre.org> wrote:

> As a side note, I would be interested with any advice to ease my module
> edit process, as the direct in-wiki edition and test become quickly
> frustrating. When I edit a basic wiki text, I often use "it's all text"
> which enable to edit in my usual text editor. But even this option won't
> work with the widget of code edition


I like It's All Text too.

There's an icon on the toolbar that looks like "<>". Clicking that will
switch between the syntax-highlighting code editor and a plain textarea
that is compatible with It's All Text.


> (the same problem occurs with "syntax highlight" extension).
>

Assuming you're talking about
https://meta.wikimedia.org/wiki/Community_Tech/Wikitext_editor_syntax_highlighting,
it looks like you can use the toolbar icon to toggle it off so that It's
All Text will work.

On the other hand, the new VE-based wikitext editor mode does not seem to
have any obvious off-switch or other method to allow It's All Text to
function.


-- 
Brad Jorsch (Anomie)
Senior Software Engineer
Wikimedia Foundation
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

[Wikitech-l] Editing module in the wiki editor lead to overloading resouces of processor

2017-10-30 Thread mathieu stumpf guntz

Hi,

As I feel I didn't gathered enough information to create a phabricator 
ticket, I send that here in order to obtain some guidance about what 
would be interesting to provide and how to get it. I can say that most 
of the time, I'm currently under Fedora 26 with Firefox 56, but that's 
probably not much relevant information.


So the problem is: when I edit a module, sometimes, but not 
systemically, the window at some point become slw. Like, there are 
large latency between typing and displaying of the resulting action. And 
indeed, for some reason, one processor core is around 100% due to a 
firefox thread.


As a side note, I would be interested with any advice to ease my module 
edit process, as the direct in-wiki edition and test become quickly 
frustrating. When I edit a basic wiki text, I often use "it's all text" 
which enable to edit in my usual text editor. But even this option won't 
work with the widget of code edition (the same problem occurs with 
"syntax highlight" extension).


Cheers

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l