Discussion:
Issue 71 in json-template: token_re_cache in javascript implementation doesn't do anything?
j***@public.gmane.org
2012-05-10 14:21:54 UTC
Permalink
Status: Accepted
Owner: martijn....-***@public.gmane.org
Labels: Type-Review Priority-Low

New issue 71 by martijn....-***@public.gmane.org: token_re_cache in javascript
implementation doesn't do anything?
http://code.google.com/p/json-template/issues/detail?id=71

In the code, the token_re_cache is used to cache regular expressions. But
it appears nothing is ever put into the cache. A good thing too, as
token_re should be recreated each time during compilation otherwise its
lastIndex property isn't reset to 0. At least, I think that's what's going
on (I was wondering how it could work with the cache in the first place;
turned out the cache doesn't work).
--
You received this message because you are subscribed to the Google Groups "JSON Template" group.
To post to this group, send email to json-template-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to json-template+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/json-template?hl=en.
j***@public.gmane.org
2012-05-19 00:26:48 UTC
Permalink
Comment #1 on issue 71 by andyc...-***@public.gmane.org: token_re_cache in javascript
implementation doesn't do anything?
http://code.google.com/p/json-template/issues/detail?id=71

Good catch, thanks. I guess I should just get rid of the cache because the
lack of the caching apparently hasn't any issues for anyone.

I can't imagine that anyone would compile more than 10 or 100 templates per
page, and it's probably negligible then. I think it was a carryover from
Python, where you could imagine a huge server loading thousands of
templates.
--
You received this message because you are subscribed to the Google Groups "JSON Template" group.
To post to this group, send email to json-template-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to json-template+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/json-template?hl=en.
j***@public.gmane.org
2012-05-19 00:31:30 UTC
Permalink
Updates:
Status: Fixed

Comment #2 on issue 71 by andyc...-***@public.gmane.org: token_re_cache in javascript
implementation doesn't do anything?
http://code.google.com/p/json-template/issues/detail?id=71

Fixed with changeset: 440:42ec17bd6386
--
You received this message because you are subscribed to the Google Groups "JSON Template" group.
To post to this group, send email to json-template-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to json-template+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/json-template?hl=en.
Loading...