Sunday, June 3, 2007

FlickrView 0.5 & 16kB barrier

Spending some time on improving FlickrView to make it more user-friendly and shareable, I've stumbled upon a dreading trouble :

[2:38] FlickrView: Script run-time error
[2:38] FlickrView: Stack-Heap Collision


Huh ? Everything was under control until I checked memory :
[2:41] FlickrView whispers: Script uses 16048 Bytes


Ok, I've only 16384 bytes available, so my margin is really thin now.. or I have to rewrite / split the script in chunks in order to make it deal with more than 16kB which is not so easy.

Now, I understand more why advanced objects have so many scripts inside to decouple the logic of the code and not break the 16kB barrier..

Time for refactoring..

1 comments:

vint said...

Ow. That sucks. I didn't even know there was smth like a 16k limit.