Page 1 of 1

please de-optimize dojo

Posted: 04 April 2013, 20:09
by ddyer
The dev system is using the optimized version of dojo, which is intended for production. It would be much
better for developers if the unoptimized version was used. For example, this error points to ly_studio.js
line 15, but line 15 is the entire file, 714,000 characters.

require({cache:{"dijit/_editor/plugins/FontChoice":function(){define("dijit/_editor/plugins/FontChoice",["dojo/_base/array","dojo/_base/declare","dojo/dom-construct","dojo/i18n","dojo/_base/lang","dojo/store/Memory","../../registry","../../_Widget","../../_TemplatedMixin","../../_WidgetsInTemplateMixin","../../form/FilteringSelect","../_Plugin","../range","dojo/i18n!../nls/FontChoice"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a,_b,_c,_d){var _e=_2("dijit._editor.plugins._FontDropDown",[_8,_9,_a],{label:"",plainText:false,templateString:"<span style='white-space: nowrap' class='dijit dijitReset dijitInline'>"+"<label class='dijitLeft dijitInline' for='${selectId}'>${label}</label>"+"<input data-dojo-type='dijit.form.FilteringSelect' required='false' "+"data-dojo-props='labelType:\"html\", labelAttr:\"label\", searchAttr:\"name\"' "+"tabIndex='-1' id='${selectId}' data-dojo-attach-point='select' value=''/>"+"</span>",postMixInProperties:function()


...

Re: please de-optimize dojo

Posted: 04 April 2013, 21:41
by Rudolf
Hello, yes good idea,
right now I trace with game interface like that:
this.showMessage("I'm here! Player_id="+player_id, 'error' );

Re: please de-optimize dojo

Posted: 08 April 2013, 14:52
by sourisdudesert
Hello,

Well... there are several things here.

We are using optimized Dojo because Dojo is composed of hundreds of tiny files, and it would takes too much time on each page refresh to load if we wouldn't.

What helps is that in fact, most of the time (99.9% of the time), the bug comes from our code and not from Dojo :) So the best thing to do is to go to last item on the call stack that correspond to our code. Then you avoid the "big line 15 effect" :)

Concerning Rudolf remark: showMessage is not our advice to trace what is happening on the code. You can find here what are our tips in your situation:
http://en.doc.boardgamearena.com/Practi ... face_logic

Cheers,

Re: please de-optimize dojo

Posted: 08 April 2013, 18:32
by ddyer
you could make both optimized and original code available, by having a "dojopath" variable or something like that.

There's more to debugging than knowing where to kick off from your own code. It would be very
useful to set breakpoints at the point of error for example, and see what it's really complaining
about by investigating the full call state.