Squeezing v8 startup time

On my day to day job, v8 in present most of the time. One philosophical foundation of our product is startup time, and all time taken from startup to the first frame drawn must be lowered as much as possible. This startup time is composed of many different steps, from GL context initialization, to scriptContinue reading “Squeezing v8 startup time”

Android Java/Json converter

With runtime type reflection I’ve been working a long time with multiplayer web-based/Android/iOS games, and one common operation on the server side or native clients is Json conversion to Java and vice versa. For such repetitive tasks I created a runtime reflection-based system to aid me in the process. Serialization is straightforward. Just recursively visitContinue reading “Android Java/Json converter”

Node.js module globals

Everyone that required a Node.js module realised that the module globals keep local to the module and don’t pollute the global namespace. From a Nodejs standpoint, this is fairly easy. Since in Javascript a function creates an scope, a module source code is then wrapped in a javascript function like: This function uses the same javascript contextContinue reading “Node.js module globals”

Change object default toString value in Javascript

For any javascript object, e.g.: A call obj.toString() will by default yield: [object Object] . Some other objects, like the browser Window object, will yield: [object Window] if printed on dev tools. We can force a value different than [object Object] by executing this: Now, obj will be identified as: Tagging special objects has never been easier than this. Addendum The native side of things would lookContinue reading “Change object default toString value in Javascript”