Memoize global-id instead of creating objects every time.
Merge pull request #5 from larrylv/memoize-global-id

Memoize global-id instead of creating objects every time.