jekyll / jekyll-avatar

A Jekyll plugin for rendering GitHub avatars
MIT License
89 stars 9 forks source link

Avoid unnecessary allocations for empty strings #34

Closed ashmaroli closed 5 years ago

ashmaroli commented 5 years ago

Summary

Instead of coercing the env-var into a String, let us simply check if it is a non-empty String.

Rationale

Every call to #render allocates 5 new "" just to check if it is empty:

benbalter commented 5 years ago

Thanks @ashmaroli!

ashmaroli commented 5 years ago

You're welcome :smiley: