finnsson / pagerjs

The Single Page Application Framework for KnockoutJS
http://pagerjs.com/
MIT License
272 stars 68 forks source link

withOnShow called tens of times per "rendering" #196

Open slisznia opened 9 years ago

slisznia commented 9 years ago

Perhaps that's something to be expected, but I've only recently discoverd that the function provided to the withOnShow gets called a lot of times during the rendering of a page. I'm not referring to the callback this function returns -- which works as expected and gets called per sourceCache attribute's value. I'm referring to the initial function you name in withOnShow.

If that's expected behavior, perhaps a little note in the documentation would clarify this in case somebody is doing something "expensive" (or stupid like I did, haha) prior to returning the "function(callback, page) {..}".