Moment.js alternatives

If you're looking for moment.js alternatives, I'd recommend reading this article about smaller, lighter-weight moment.js alternatives.


Manager READMEs

A friend recently introduced me to the ideas of creating a Manager README.

The idea is that for coworkers and new team members, you give a rundown of how you like to work and what they can expect.

Some of the canonical READMEs that are frequently used as templates can be found here.

A list of the current READMEs out in the wild (including mine), as well as some links to guides to help write them, can be found here.

You can read about my management style here.


Moment.js instantiation slowness

Was doing some test speedup/performance improvement work recently on the search API and found out something; the moment.js library takes around 100 microseconds (or .1 milliseconds) to create a new instance.

Why is 100 microseconds a big deal?

If you're processing:

  • 100 records
  • Where each record has 7 date fields
  • Then you've created 70,000 microseconds of work
  • Or 70 milliseconds of processing delay.

By doing some memoization of date formatting in our API, we've seen these performance improvements:

Response Times

BeforeAfter
Fastest211ms194ms
Max651ms597ms
Average309ms268ms

Without making any significant changes, we've managed to shave 41ms off of our response time on average!

Hope this helps someone else.


Read More...