You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
http://cfcomentada.azurewebsites.net/
It took 25 seconds to execute.
Is there a way to make the execution quicker ?
Since this page is not gonna change, maybe there is a way to store the
per-proccessing somewhere.
The only thing that can cause such execution time is the script that fetches the comments count from Disqus to display them besides the paragraphs (the actual comment threads are not being pre-fetched).
You can prevent this script from running by passing displayCount: false in your settings object. you won't be able to display the comment count though.
But already is set to '''displayCount: false''', check the code I just sent on the comment before.
Probably is one of these document.createElement.
It generates this kind of script, and there is a repetition, maybe it can concatenate, here is an example of script that is gereated:
function (n){return typeof i===o||n&&i.event.triggered===n.type?t:i.event.dispatch.apply(l.elem,arguments)}
function (n,i,u){return null==n||"boolean"==typeof n?r.apply(this,arguments):this.animate(vt(t,!0),n,i,u)}
function (n,i,u){return null==n||"boolean"==typeof n?r.apply(this,arguments):this.animate(vt(t,!0),n,i,u)}
function (n){return typeof i===o||n&&i.event.triggered===n.type?t:i.event.dispatch.apply(l.elem,arguments)}
function (n){return typeof i===o||n&&i.event.triggered===n.type?t:i.event.dispatch.apply(l.elem,arguments)}
function (n){return typeof i===o||n&&i.event.triggered===n.type?t:i.event.dispatch.apply(l.elem,arguments)}
function (n){return typeof i===o||n&&i.event.triggered===n.type?t:i.event.dispatch.apply(l.elem,arguments)}
function (n){return typeof i===o||n&&i.event.triggered===n.type?t:i.event.dispatch.apply(l.elem,arguments)}
function (n){return typeof i===o||n&&i.event.triggered===n.type?t:i.event.dispatch.apply(l.elem,arguments)}
function (n){return typeof i===o||n&&i.event.triggered===n.type?t:i.event.dispatch.apply(l.elem,arguments)}
function (n){return typeof i===o||n&&i.event.triggered===n.type?t:i.event.dispatch.apply(l.elem,arguments)}
function (n){return typeof i===o||n&&i.event.triggered===n.type?t:i.event.dispatch.apply(l.elem,arguments)}
Is there a way to reuse the javaScript code that was already generated, without needing to generate it again ?
Maybe a new parameter on the constructor.
Activity
tsi commentedon Dec 7, 2013
The only thing that can cause such execution time is the script that fetches the comments count from Disqus to display them besides the paragraphs (the actual comment threads are not being pre-fetched).
You can prevent this script from running by passing
displayCount: falsein your settings object. you won't be able to display the comment count though.titombo commentedon Dec 7, 2013
But already is set to '''displayCount: false''', check the code I just sent on the comment before.
Probably is one of these document.createElement.
It generates this kind of script, and there is a repetition, maybe it can concatenate, here is an example of script that is gereated:
http://cfcomentada.azurewebsites.net/js?v=rHWjXiMtWOTPjhUf3vKK52W1uMgkpJt0Wyh5RANE5MQ1/event/seq/1/anonymous
function (n){return typeof i===o||n&&i.event.triggered===n.type?t:i.event.dispatch.apply(l.elem,arguments)}
function (n,i,u){return null==n||"boolean"==typeof n?r.apply(this,arguments):this.animate(vt(t,!0),n,i,u)}
function (n,i,u){return null==n||"boolean"==typeof n?r.apply(this,arguments):this.animate(vt(t,!0),n,i,u)}
function (n){return typeof i===o||n&&i.event.triggered===n.type?t:i.event.dispatch.apply(l.elem,arguments)}
function (n){return typeof i===o||n&&i.event.triggered===n.type?t:i.event.dispatch.apply(l.elem,arguments)}
function (n){return typeof i===o||n&&i.event.triggered===n.type?t:i.event.dispatch.apply(l.elem,arguments)}
function (n){return typeof i===o||n&&i.event.triggered===n.type?t:i.event.dispatch.apply(l.elem,arguments)}
function (n){return typeof i===o||n&&i.event.triggered===n.type?t:i.event.dispatch.apply(l.elem,arguments)}
function (n){return typeof i===o||n&&i.event.triggered===n.type?t:i.event.dispatch.apply(l.elem,arguments)}
function (n){return typeof i===o||n&&i.event.triggered===n.type?t:i.event.dispatch.apply(l.elem,arguments)}
function (n){return typeof i===o||n&&i.event.triggered===n.type?t:i.event.dispatch.apply(l.elem,arguments)}
function (n){return typeof i===o||n&&i.event.triggered===n.type?t:i.event.dispatch.apply(l.elem,arguments)}
It seems that create.Element is better even than an equivalent jQuery method.
http://stackoverflow.com/questions/268490/jquery-document-createelement-equivalent
titombo commentedon Dec 8, 2013
Is there a way to reuse the javaScript code that was already generated, without needing to generate it again ?
Maybe a new parameter on the constructor.