Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 11-16-2012, 04:03 PM   #286
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,069
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by silver18 View Post
... I promise you: I ended adding things!!
Liar!
geekmaster is offline   Reply With Quote
Old 11-18-2012, 08:48 AM   #287
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 698
Karma: 1545625
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Quote:
Originally Posted by geekmaster View Post
Liar!

At least I need some time to find something else to add!!

Anyway, it's so funny setting a 0.05sec delay: if you use light images, it seems you can read just like Vicki does (or did)!
silver18 is offline   Reply With Quote
 
Enthusiast
Old 11-18-2012, 03:45 PM   #288
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 698
Karma: 1545625
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
I tried a stress test...
After about 200 pages @ 0.1sec Komic is really slow!
After a few more pages, it starts to become unresponsive.
If I keep on trying, I get a force close.
I think it's related to the available memory, but I can't understand how the memory is managed.
Does the kindle free it when needed?
As I can set the warning and the "close-it-now" memory level for my WAF, why I do get the force close but I can't see any memory management before?
silver18 is offline   Reply With Quote
Old 11-18-2012, 04:13 PM   #289
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 712
Karma: 2290994
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
I guess, force closing of WAF app is the memory management.

WAF app is essentially a html page rendered by WebKit engine with a thin layer of Kindle-specific API exposed through special JavaScript object. When you execute your own JavaScript in context of your WAF app, you can create memory leaks. Though JavaScript implementation provides garbage collector (i.e. automatic memory management), it's possible to create memory leaks in JavaScript program. With many memory leaks (or with one repeated memory leak), memory consumption grows, and at some point your WAF app will be terminated, because on terminating all memory consumed by [any] application will be freed.

You should check free memory size with free command at the start of your app and at the end of stress test to confirm you hypothesis.

Last edited by eureka; 11-18-2012 at 04:15 PM.
eureka is offline   Reply With Quote
Old 11-19-2012, 04:54 AM   #290
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 698
Karma: 1545625
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
I know the force close is the memory management, but it should be what kindle does when hitting memUnloadLevel.
I can't understand what the kindle does when reaching the memWarnLevel (if it is supposed to do something other than logging).

I always free memory before running Komic, but I didn't ever checked the free memory before and after! I'll do it asap!

Anyway, do you think I can do something (other that improving my coding skills to avoid memory leaks)?

Is there a way to find weak spots in my code?

Thanks a lot!
silver18 is offline   Reply With Quote
Old 11-19-2012, 05:08 AM   #291
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 712
Karma: 2290994
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by silver18 View Post
I can't understand what the kindle does when reaching the memWarnLevel (if it is supposed to do something other than logging).
I guess, memWarnLevel value is processed by /usr/lib/libappmgr.so library. Looking at strings, contained at that library, I think it sends LIPC event appMemoryAboveWarnLevel, when app's memory consumption reaches memWarnLevel value.
Quote:
Originally Posted by silver18 View Post
Anyway, do you think I can do something (other that improving my coding skills to avoid memory leaks)?

Is there a way to find weak spots in my code?

Thanks a lot!
Nope, sorry. Maybe your problem isn't memory leaks anyway. I was just speculating.
eureka is offline   Reply With Quote
Old 11-19-2012, 07:41 AM   #292
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,510
Karma: 5840130
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by eureka View Post
I guess, memWarnLevel value is processed by /usr/lib/libappmgr.so library. Looking at strings, contained at that library, I think it sends LIPC event appMemoryAboveWarnLevel, when app's memory consumption reaches memWarnLevel value.

Nope, sorry. Maybe your problem isn't memory leaks anyway. I was just speculating.
Perhaps your application is supposed to catch that event and do something about it.
knc1 is offline   Reply With Quote
Old 11-19-2012, 07:47 AM   #293
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 698
Karma: 1545625
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Quote:
Originally Posted by knc1 View Post
Perhaps your application is supposed to catch that event and do something about it.
I don't think so: the broswer uses memWarnlevel in appreg.db but it doesn't do anything inside its own code (AFAIK, searching in the waf folder).

I think eureka found the correct answer, although I don't know what the kindle does with appMemoryAboveWarnLevel event!
silver18 is offline   Reply With Quote
Old 11-19-2012, 08:13 AM   #294
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 712
Karma: 2290994
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by silver18 View Post
I think eureka found the correct answer, although I don't know what the kindle does with appMemoryAboveWarnLevel event!
I don't think KT does something on this event, libappmgr.so just provides a way to react to "overusing" of memory. It's just an implemented, potentially useful feature.
eureka is offline   Reply With Quote
Old 11-20-2012, 07:38 AM   #295
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 698
Karma: 1545625
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Quote:
Originally Posted by eureka View Post
I don't think KT does something on this event, libappmgr.so just provides a way to react to "overusing" of memory. It's just an implemented, potentially useful feature.

This makes sense to me...just like many more features in Kindle Touch!


In the meanwhile, I added the last thing to Komic.
It's something I wanted to add from the very first release.
It's the image post-processing menu. I added only the contrast and brightness regulation and I'm not too inclined to add other features as I think that's all we need here.

I'm still working on this, but it shouldn't take long (I need to apply the regulation to all pages and, finally, I have to port it to landscape mode).

I tested it with a color comic (Watchmen) and here you can see the before and after:
Attached Thumbnails
Click image for larger version

Name:	0.jpg
Views:	86
Size:	123.7 KB
ID:	96516   Click image for larger version

Name:	1.jpg
Views:	82
Size:	125.9 KB
ID:	96517  
silver18 is offline   Reply With Quote
Old 11-22-2012, 01:15 PM   #296
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 698
Karma: 1545625
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Here's the final version of post-processing feature.
Image post-processing is now available both in portrait and in landscape mode.
Settings are stored even if Komic is closed but not applied automatically when starting Komic.

When choosing contrast and brightness, you need to press Confirm to apply changes (otherwise it would take ages to switch from one value to another).

Settings are reset (contrast 0 and brightness 0) using Reset button.
Once settings are changed, a new option appears in reading menu: this reverts to the original image aspect but keeps the settings stored.

Post-processing is deactivated when choosing:
- change page size
- rotate image (in portrait mode)
- zoom in & out using zoom buttons
and is automatically activated when switching back to normal use.
On the other hand, post-processing is automatically applied when jumping to page or when going to next/prev page.

It works togheter with image-ratio feature (but it can works also alone! ).

It adds some processing time to page turning though.
This time is proportional to the page size not to the file size (AFAIK...). This means that when using post-processing, landscape mode is a bit slower than portrait mode.

Using both image-ratio and post-processing features makes page turning a bit slow: I can't do anything (at least I don't know what to do).


v2.1 is ready. I'm still testing everything and trimming the code to make it lighter.

Here are some screenshots:
Attached Thumbnails
Click image for larger version

Name:	screenshot_2012-11-22T18_57_32-0100.gif
Views:	91
Size:	22.0 KB
ID:	96653   Click image for larger version

Name:	screenshot_2012-11-22T18_50_41-0100.gif
Views:	94
Size:	41.2 KB
ID:	96654   Click image for larger version

Name:	screenshot_2012-11-22T18_49_54-0100.gif
Views:	207
Size:	37.5 KB
ID:	96655  
silver18 is offline   Reply With Quote
Old 11-23-2012, 11:50 AM   #297
captainreuben
Junior Member
captainreuben began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Feb 2012
Device: Kindle Touch
Hey Silver18 great work.

I have a weird problem, where any page I turn try to view just shows the 'image missing' icon.

Any ideas?
captainreuben is offline   Reply With Quote
Old 11-23-2012, 12:28 PM   #298
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 698
Karma: 1545625
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Quote:
Originally Posted by captainreuben View Post
Hey Silver18 great work.

I have a weird problem, where any page I turn try to view just shows the 'image missing' icon.

Any ideas?
Have you read the "How to use" paragraph here?

Is your first image in every folder named 0?
Are your image all jpg or png?
"It doesn't work" isn't really helpful when debugging...
silver18 is offline   Reply With Quote
Old 11-23-2012, 12:41 PM   #299
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021142
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Okay I have a question. (a dumb one, don't get too excited)

How come that arrow Says swiss?
Surely the EU have outlawed usage of others peoples countries in onomatopoeic sounds before now?

Spoiler:


BAAHAHAHAHAA . sorry too much coffee.
twobob is offline   Reply With Quote
Old 11-23-2012, 12:47 PM   #300
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 698
Karma: 1545625
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Quote:
Originally Posted by twobob View Post
Okay I have a question. (a dumb one, don't get too excited)

How come that arrow Says swiss?
Surely the EU have outlawed usage of others peoples coutries in onomatopoeic sounds before now?

Spoiler:


BAAHAHAHAHAA . sorry too much coffee.
As you can see, it says "SwIIIss". This saved the author from this!
silver18 is offline   Reply With Quote
Reply

Tags
launcher add-ons

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Android Any Comic Reader App working ? astrocity enTourage Archive 38 03-01-2011 12:23 PM
iPad Good comic reader for iPad? jocampo Apple Devices 5 02-24-2011 06:36 AM
SmartQ V7 comic reader help Renji Alternative Devices 21 12-15-2009 10:05 PM
Macintosh Comic Reader and PDF creator now available :) grayfox iRex 3 01-03-2008 05:06 PM


All times are GMT -4. The time now is 04:43 AM.


MobileRead.com is a privately owned, operated and funded community.