javascript - firefox crash with angular ( Garbage Collector troll? ) -
----edit question long , hard understand------
here working exemple : http://codepen.io/anon/pen/mwapgb warning : make firefox crash ! , if dare, click around 500 time on div (i suggest use tool simulate it. rip mouse)
but http://codepen.io/anon/pen/ennqde wont make firefox crash
what difference :
function getdatefromdatetimepython(stringdate){ // crash var partiedate = stringdate.split(' '); var ymd = partiedate[0].split('-'); var hms = partiedate[1].split(':'); return new date(date.utc(ymd[0],ymd[1]-1,ymd[2],hms[0],hms[1],hms[2],0)); } function getdatefromdatetimepython(stringdate){ // don't var partiedate = stringdate.split(' '); var tmp = partiedate[0]; // add var tmp2 = partiedate[1]; // add var ymd = tmp.split('-'); // change var hms = tmp2.split(':'); // change return new date(date.utc(ymd[0],ymd[1]-1,ymd[2],hms[0],hms[1],hms[2],0)); }
i'm going crazy. wrong first practice ?
ok , it's stupid make 3 split, combined in 1 . whenever. why blow firefox , why aren't chrome nor ie affect ?
may trapped infinite loop or process instantiated involves heavy processing drains memory available browser.
Comments
Post a Comment