Chrome [Violation] 'Load' Handler Took 808Ms

I worked with openlayer3. Now I got this kind of warning: Console:

[Violation] 'load' handler took 308ms  ol-debug.js.xhtml?ln=js:6967 
[Violation] 'load' handler took 808ms
ol.events.bindListener_ = function(listenerObj) {
  var boundListener = function(evt) { // <- Zeile 6967
    var listener = listenerObj.listener;
    var bindTo = listenerObj.bindTo || listenerObj.target;
    if (listenerObj.callOnce) {
      ol.events.unlistenByKey(listenerObj);
    }
    return listener.call(bindTo, evt);
  };
  listenerObj.boundListener = boundListener;
  return boundListener;
};

Is it maybe a bug on Google Chrome?

Thanks

1 Answer

The message [Violation] 'load' handler took x ms seems more like a warning that your code took a long time to run, than anything else. Perhaps you should try to move the code execution out of the load handler, and into something else (a button click?).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article
Twitter Facebook Pinterest