diff --git a/web/js/related-tags.js b/web/js/related-tags.js index ef0d811..c51e6f5 100644 --- a/web/js/related-tags.js +++ b/web/js/related-tags.js @@ -1,4 +1,3 @@ -// filepath: v:\Programs\StabilityMatrix-win-x64\Data\Packages\ComfyUI-New\custom_nodes\ComfyUI-Autocomplete-Plus\web\js\related-tags.js import { settingValues } from './settings.js'; import { TagCategory, TagData, autoCompleteData } from './data.js'; import { @@ -118,10 +117,12 @@ function searchRelatedTags(tag) { // Limit to max number of suggestions const result = relatedTags.slice(0, settingValues.maxRelatedTags); - const endTime = performance.now(); - const duration = endTime - startTime; - console.debug(`[Related-Tags] Find tags to related "${tag}" took ${duration.toFixed(2)}ms.`); - + if(settingValues._logprocessingTime) { + const endTime = performance.now(); + const duration = endTime - startTime; + console.debug(`[Autocomplete-Plus] Find tags to related "${tag}" took ${duration.toFixed(2)}ms.`); + } + return result; } diff --git a/web/js/settings.js b/web/js/settings.js index 404edd9..537fe53 100644 --- a/web/js/settings.js +++ b/web/js/settings.js @@ -14,6 +14,6 @@ export const settingValues = { _useFallbackAttachmentForEventListener: false, // Fallback to attach event listener when somthing goes wrong // Debugging settings (use internally) - _hideWhenOutofFocus: false, // Hide UI when the input is out of focus - _logprocessingTime: true, // Log processing time for debugging + _hideWhenOutofFocus: true, // Hide UI when the input is out of focus + _logprocessingTime: false, // Log processing time for debugging } \ No newline at end of file