mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 05:17:24 +02:00
Disable profiling in entityList.js
This commit is contained in:
parent
9b9785d250
commit
3cc90d3c80
1 changed files with 11 additions and 13 deletions
|
@ -11,8 +11,9 @@
|
||||||
/* global EntityListTool, Tablet, selectionManager, Entities, Camera, MyAvatar, Vec3, Menu, Messages,
|
/* global EntityListTool, Tablet, selectionManager, Entities, Camera, MyAvatar, Vec3, Menu, Messages,
|
||||||
cameraManager, MENU_EASE_ON_FOCUS, deleteSelectedEntities, toggleSelectedEntitiesLocked, toggleSelectedEntitiesVisible */
|
cameraManager, MENU_EASE_ON_FOCUS, deleteSelectedEntities, toggleSelectedEntitiesLocked, toggleSelectedEntitiesVisible */
|
||||||
|
|
||||||
|
var PROFILING_ENABLED = false;
|
||||||
var profileIndent = '';
|
var profileIndent = '';
|
||||||
PROFILE = function(name, fn, args) {
|
PROFILE = !PROFILING_ENABLED ? function() { } : function(name, fn, args) {
|
||||||
console.log("PROFILE-Script " + profileIndent + "(" + name + ") Begin");
|
console.log("PROFILE-Script " + profileIndent + "(" + name + ") Begin");
|
||||||
var previousIndent = profileIndent;
|
var previousIndent = profileIndent;
|
||||||
profileIndent += ' ';
|
profileIndent += ' ';
|
||||||
|
@ -21,7 +22,7 @@ PROFILE = function(name, fn, args) {
|
||||||
var delta = Date.now() - before;
|
var delta = Date.now() - before;
|
||||||
profileIndent = previousIndent;
|
profileIndent = previousIndent;
|
||||||
console.log("PROFILE-Script " + profileIndent + "(" + name + ") End " + delta + "ms");
|
console.log("PROFILE-Script " + profileIndent + "(" + name + ") End " + delta + "ms");
|
||||||
}
|
};
|
||||||
|
|
||||||
EntityListTool = function(shouldUseEditTabletApp) {
|
EntityListTool = function(shouldUseEditTabletApp) {
|
||||||
var that = {};
|
var that = {};
|
||||||
|
@ -82,7 +83,6 @@ EntityListTool = function(shouldUseEditTabletApp) {
|
||||||
PROFILE("Script-JSON.stringify", function() {
|
PROFILE("Script-JSON.stringify", function() {
|
||||||
dataString = JSON.stringify(data);
|
dataString = JSON.stringify(data);
|
||||||
});
|
});
|
||||||
console.log("Length: ", dataString.length, data.type);
|
|
||||||
PROFILE("Script-emitScriptEvent", function() {
|
PROFILE("Script-emitScriptEvent", function() {
|
||||||
webView.emitScriptEvent(dataString);
|
webView.emitScriptEvent(dataString);
|
||||||
if (entityListWindow.window) {
|
if (entityListWindow.window) {
|
||||||
|
@ -150,7 +150,6 @@ EntityListTool = function(shouldUseEditTabletApp) {
|
||||||
PROFILE("getProperties", function() {
|
PROFILE("getProperties", function() {
|
||||||
for (var i = 0; i < ids.length; i++) {
|
for (var i = 0; i < ids.length; i++) {
|
||||||
var id = ids[i];
|
var id = ids[i];
|
||||||
//var properties = Entities.getEntityProperties(id);
|
|
||||||
var properties = Entities.getEntityProperties(id, ['name', 'type', 'locked',
|
var properties = Entities.getEntityProperties(id, ['name', 'type', 'locked',
|
||||||
'visible', 'renderInfo', 'type', 'modelURL', 'materialURL', 'script']);
|
'visible', 'renderInfo', 'type', 'modelURL', 'materialURL', 'script']);
|
||||||
|
|
||||||
|
@ -212,8 +211,7 @@ EntityListTool = function(shouldUseEditTabletApp) {
|
||||||
try {
|
try {
|
||||||
data = JSON.parse(data);
|
data = JSON.parse(data);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
console.log(data);
|
print("entityList.js: Error parsing JSON: " + e.name + " data " + data);
|
||||||
//print("entityList.js: Error parsing JSON: " + e.name + " data " + data);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue