Encuesta de investigación: Cuéntanos sobre tu experiencia con Blockly
Comenzar encuesta
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
blockly > utiles > dom > startTextWidthCache
Función utils.dom.startTextWidthCache()
Comienza a almacenar en caché los anchos de texto. Cada llamada a esta función también DEBE llamar a stopTextWidthCache. Las memorias caché no deben sobrevivir entre subprocesos de ejecución.
Signature:
export declare function startTextWidthCache(): void;
Muestra:
void
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
Última actualización: 2024-08-22 (UTC)
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Falta la información que necesito","missingTheInformationINeed","thumb-down"],["Muy complicado o demasiados pasos","tooComplicatedTooManySteps","thumb-down"],["Desactualizado","outOfDate","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Problema con las muestras o los códigos","samplesCodeIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2024-08-22 (UTC)"],[[["Initializes a cache for measuring text widths, improving performance for frequent text measurements."],["This function must be paired with `stopTextWidthCache()` to properly manage the cache and prevent memory leaks."],["Text width caches should not persist across different execution threads to avoid data inconsistencies."],["The function primarily serves as an internal optimization for Blockly and does not typically require direct user interaction."]]],["The `startTextWidthCache()` function initiates the caching of text widths. It's crucial that each invocation of this function is paired with a subsequent call to `stopTextWidthCache()`. The caching mechanism is designed for temporary use within a single execution thread and should not persist across different threads. This function does not return any value.\n"]]