Gio đã retweet
Gio
78 posts

Gio
@userIsNotDef
Frontend developer, I guess
Santa Ana, El Salvador Tham gia Nisan 2024
239 Đang theo dõi14 Người theo dõi
Gio đã retweet
Gio đã retweet
Gio đã retweet
Gio đã retweet

Hace tiempo les contaba que hubo un problema de memoria con una app de Node.js que tenemos, donde de repente los 3 procesos se comían toda la RAM disponible.
Intentamos varias cosas, no bastó reiniciar el servicio, ni tampoco quitar el tope de memoria que maneja node por default
Después de analizar heap snapshots y perf logs, encontramos que el problema no era un memory leak clásico, sino una mala estrategia de caching en memoria compartida entre procesos, cada worker estaba manteniendo su propia copia de un objeto muy grande con datos de configuración, lo que multiplicaba por tres el consumo real de memoria.
La solución fue la siguiente:
mover ese cache a un in-memory store centralizado (Redis) y cambiar la inicialización para que los workers pidieran los datos bajo demanda, en lugar de precargar todo al arrancar.
Con eso, bajamos el uso de RAM como en un 50%, eliminamos picos de GC innecesarios y la app volvió a comportarse casi como debía porque aún tenemos temitas con mongo que se pueden eficientar.
Español
Gio đã retweet

Gio đã retweet
Gio đã retweet
Gio đã retweet
Gio đã retweet
Gio đã retweet

Qualcomm compró Arduino.
Y lanzan el Arduino UNO Q: un competidor de Raspberry Pi como primer producto, a 44 dólares. Soporta Linux y ejecuta modelos de IA locales para visión.
Qualcomm@Qualcomm
We’re acquiring @Arduino to make edge computing and #AI more accessible. Arduino will remain independent, supporting multiple silicon vendors and its community. Launching today: Arduino UNO Q, powered by Qualcomm #Dragonwing. Discover more: bit.ly/4nE0rP2
Español
Gio đã retweet
Gio đã retweet
Gio đã retweet
Gio đã retweet
Gio đã retweet
Gio đã retweet
Gio đã retweet

extra tip when dealing with animation 🎞️
set `subtree: true` to wait for all child animations/transitions to finish 🤙
await Promise.allSettled(
element.getAnimations({ subtree: true }).map(
a => a finished
)
)
please don't use setTimeout 🙏
jhey ʕ•ᴥ•ʔ@jh3yy
JavaScript Tip ⭐️ Avoid setTimeout when dealing with element animations ⚠️ Use Element.getAnimations() and tap into the animation lifecycle instead of guessing 🙏 Great for unmount animations in React, etc. Let your CSS be the source of truth 🥇
English






























