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 08-23-2013, 11:08 AM   #1
richy1989
Connoisseur
richy1989 really knows where his or her towel isrichy1989 really knows where his or her towel isrichy1989 really knows where his or her towel isrichy1989 really knows where his or her towel isrichy1989 really knows where his or her towel isrichy1989 really knows where his or her towel isrichy1989 really knows where his or her towel isrichy1989 really knows where his or her towel isrichy1989 really knows where his or her towel isrichy1989 really knows where his or her towel isrichy1989 really knows where his or her towel is
 
Posts: 67
Karma: 70690
Join Date: May 2013
Device: Kindle Paperwhite 1 & Kindle 4 Black
Unhappy Some discovery.But it was wrong.

Hi,it's a new new discovery for the Kindle.
For instance, the indexer can waste almost 100% of the CPU time when it is running.
For to release the CPU,
we can reduce using the CPU by make a change.

There are many ' *.jar ' in the directory of /usr/java/bin/cvm

just like:
*de_DE.jar
*es_ES.jar
*fr_FR.jar
*it_IT.jar
*ja_JP.jar
*pt_BR.jar

they always working when our Kindle is running,but we don't use it if we are reading the 'local language‘ document.

Then I found something useful in the file /etc/upstart/framework
there is a line said
'JAR_LIST=$(find $EHOME/lib $EHOME/booklet /usr/local/ebook/lib /opt/amazon/pkg/oss/lib -name \*.jar 2>/dev/null) '

So we can backup the files and remove it from our device for to prevent them from running.

Here is the main steps:
------------------------------------------------------------------
1.Install the Jailbreak and usbnetwork

2.Use the Winscp to make a ssh to the Kindle

3.Run the script:

#!/bin/sh

/etc/upstart/framework stop

cd /opt/amazon/ebook/lib
mkdir -p /mnt/us/.backup/opt/amazon/ebook/lib

mv *de_DE.jar /mnt/us/.backup/opt/amazon/ebook/lib/
mv *es_ES.jar /mnt/us/.backup/opt/amazon/ebook/lib/
mv *fr_FR.jar /mnt/us/.backup/opt/amazon/ebook/lib/
mv *it_IT.jar /mnt/us/.backup/opt/amazon/ebook/lib/
mv *ja_JP.jar /mnt/us/.backup/opt/amazon/ebook/lib/
mv *pt_BR.jar /mnt/us/.backup/opt/amazon/ebook/lib/

/etc/upstart/framework start

sync
sync
sync
reboot


4.Restart the Kindle.

----------------------------------------------------------------------

Tips:Chose the right files ’*.jar'!!!!!!!!!
Example:If your local language is Japannes,
you will have to keep the file '*ja_JP.jar' from being deleted!!!!!


Here are the situation of CPU after finished all the step above.

Before operation





After operation




It's test Successfuly for Paperwhite
Attached Images
File Type: bmp 1.bmp (209.4 KB, 1087 views)
File Type: bmp 2.bmp (207.2 KB, 1045 views)

Last edited by richy1989; 08-25-2013 at 04:53 AM.
richy1989 is offline   Reply With Quote
Old 08-23-2013, 11:14 AM   #2
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Apples vs. oranges.

You're comparing a snapshot from a point in time where the framework is doing background tasks (catalog/cleanup/scan/indexing) [mostly from some of the niced threads, hence most of the CPU usage falling in the 'nice' column], to one where it isn't.

That's not even taking into account that the CPU frequency is variable, so, depending on which state the CPU governor thought the CPU should be in, top's percentage of CPU usage for the same task can vary wildly.

Last edited by NiLuJe; 08-23-2013 at 11:17 AM.
NiLuJe is offline   Reply With Quote
Old 08-23-2013, 11:32 AM   #3
knc1
Going Viral
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: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Hmm...
It might be a useful change for other reasons.

But I agree, better testing is called for to justify changing files in the Amazon image of the filesystem.

Since we can not (yet) de-brick a Kpw, changing files in the Amazon image that might cause an firmware update to fail in way that leaves the Kindle 'bricked' is not a good idea.

Note: There is a patch to U-Boot available from the Freescale Community that will force the SoC to switch to 'Fastboot' mode on the next restart for the MX508 SoC.
A tad bit too invasive of a change to test for my paygrade.

Last edited by knc1; 08-23-2013 at 11:42 AM.
knc1 is offline   Reply With Quote
Old 08-23-2013, 11:34 AM   #4
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
The CPU isn't being "wasted" when the Kindle is indexing content. It's pegged at 100% because the CPU is working as hard as it can.
HarryT is offline   Reply With Quote
Old 08-23-2013, 02:00 PM   #5
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736094
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
You're getting something seriously wrong here. As NiLuJe said, you're comparing apples with oranges.

Having these "unused" language-specific jar files in the classpath has negligible impact on CPU performance and zero impact on memory requirement.

Why? Because classes are looked up and loaded exactly once in, namely when they are first needed. Say you want to load a ResourceBundle named "squirrel", and your language is ja_JP. Then (at most), the following three classes will be loaded: squirrel_ja_JP, squirrel_ja, squirrel.

While looking up these classes, yes, the "unneeded" jars will be searched. But this is fast, because one only has to look at the jar file's central directory.

So, while I appreciate your effort, I think that this is a really bad idea. You are not gaining anything (except for a speedup that can probably be measured in milliseconds, or at most seconds, over the entire runtime of the Kindle), but you're breaking functionality.
ixtab is offline   Reply With Quote
Old 08-23-2013, 11:44 PM   #6
nasser
Evangelist
nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.
 
nasser's Avatar
 
Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
In my PW, there is no directory /usr/java/bin/cvm..

There is only a 1.8MB file called cvm..

Had some fun searching out all *.jar files and filtering them.. see attached zip with list in csv format.. contains only the non english ones..

There are around 200+ language specific jar files.. if we exclude the "en_GB" files, this amounts to around 10MB worth of "wasted" files..

Taking due heed of knc1 and ixtab's warnings, I wouldn't want to remove these files and screw up something..

Still.. some interesting points:
  • ad_booklet-xx_YY.jar and AdManager-xx_YY.jar.. my PW is the ad free version.. so why are these files needed..?
  • MediaPlayer-xx_YY.jar.. on the soundless PW, what media..? Mebbe this is used for the "silent movie player" kindlet..?
  • TopazReader-impl-xx_YY.jar.. what's topaz..? some new format..?
  • oobetutorial-xx_YY.jar.. this is the stuff that comes up when you first unbox and start up the kindle..?
  • My PW had *en_GB jars.. but no *en_US jars..
Attached Files
File Type: zip Kindle_Jars_List.csv.zip (2.0 KB, 156 views)

Last edited by nasser; 08-23-2013 at 11:48 PM. Reason: forgot attachment
nasser is offline   Reply With Quote
Old 08-23-2013, 11:55 PM   #7
GoSharks
SQUIRREL!!
GoSharks ought to be getting tired of karma fortunes by now.GoSharks ought to be getting tired of karma fortunes by now.GoSharks ought to be getting tired of karma fortunes by now.GoSharks ought to be getting tired of karma fortunes by now.GoSharks ought to be getting tired of karma fortunes by now.GoSharks ought to be getting tired of karma fortunes by now.GoSharks ought to be getting tired of karma fortunes by now.GoSharks ought to be getting tired of karma fortunes by now.GoSharks ought to be getting tired of karma fortunes by now.GoSharks ought to be getting tired of karma fortunes by now.GoSharks ought to be getting tired of karma fortunes by now.
 
GoSharks's Avatar
 
Posts: 1,636
Karma: 8400000
Join Date: Nov 2010
Location: California
Device: K-Fire, PW2, PW3
@nasser-
I can't help with the rest but I'm pretty sure Topaz is an old format (predecessor to mobi).
GoSharks is offline   Reply With Quote
Old 08-24-2013, 12:11 AM   #8
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736094
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by nasser View Post
Still.. some interesting points:
ad_booklet-xx_YY.jar and AdManager-xx_YY.jar.. my PW is the ad free version.. so why are these files needed..?
Because there is a single firmware for all Kindles of the same model. Whether you will be shown ads (or not) is determined by phoning home to Amazon.

Quote:
MediaPlayer-xx_YY.jar.. on the soundless PW, what media..? Mebbe this is used for the "silent movie player" kindlet..?
No idea, really. But "media" is a very broad term which doesn't only encompass audio and video.

Quote:
TopazReader-impl-xx_YY.jar.. what's topaz..? some new format..?
Nope, a really old format.
Quote:
oobetutorial-xx_YY.jar.. this is the stuff that comes up when you first unbox and start up the kindle..?
No idea.

Quote:
My PW had *en_GB jars.. but no *en_US jars..
en_US is the language that all resource bundles default to and are defined in. Whatever your current locale is, you will fall back to the default locale if no definition for the requested resource is found. And the default, as said before, is en_US. So no need to define it explicitly.
ixtab is offline   Reply With Quote
Old 08-24-2013, 06:27 AM   #9
aditya3098
Guru
aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.
 
Posts: 608
Karma: 1588610
Join Date: Jan 2012
Device: Kindle Scribe
MediaPlayer might be the audiobook player
aditya3098 is offline   Reply With Quote
Old 08-24-2013, 06:59 AM   #10
Sideromelane
FYIAD
Sideromelane has much to be proud ofSideromelane has much to be proud ofSideromelane has much to be proud ofSideromelane has much to be proud ofSideromelane has much to be proud ofSideromelane has much to be proud ofSideromelane has much to be proud ofSideromelane has much to be proud ofSideromelane has much to be proud ofSideromelane has much to be proud ofSideromelane has much to be proud of
 
Sideromelane's Avatar
 
Posts: 15
Karma: 27492
Join Date: Aug 2013
Location: Scotland
Device: Kindle Paperwhite
Something I've learned from fifteen years of Windows, and several years of Android - Never, EVER delete system files unless you know EXACTLY what those files are for, and, more importantly, what DEPENDS upon those files. Deleting a jar for something you don't see youself ever using is a good way to soft-brick your kindle four months down the road, once you've forgotten what you deleted, and try opening one specific kindlet or book that depends explicitly upon something you forgot you ever deleted in the first place!

Nothing in the OS takes up so much space that it is essential to get rid of it to cram in more books. Or free up an imaginary % of CPU speed, because that's not how CPU's work.
Sideromelane is offline   Reply With Quote
Old 08-24-2013, 07:14 AM   #11
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,586
Karma: 6299993
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
^-- This.
The space is minimal.

I AM 100% behind any effort to accelerate machine performance.
And I applaud Richies efforts so far.

This one feels risky though.
My two cents.
twobob is offline   Reply With Quote
Old 08-25-2013, 04:52 AM   #12
richy1989
Connoisseur
richy1989 really knows where his or her towel isrichy1989 really knows where his or her towel isrichy1989 really knows where his or her towel isrichy1989 really knows where his or her towel isrichy1989 really knows where his or her towel isrichy1989 really knows where his or her towel isrichy1989 really knows where his or her towel isrichy1989 really knows where his or her towel isrichy1989 really knows where his or her towel isrichy1989 really knows where his or her towel isrichy1989 really knows where his or her towel is
 
Posts: 67
Karma: 70690
Join Date: May 2013
Device: Kindle Paperwhite 1 & Kindle 4 Black
Sorry,

I think I made a big mistake.

But I will make any effort to accelerate machine performance still!

Thanks for everyone's help!

richy1989 is offline   Reply With Quote
Old 08-25-2013, 08:19 AM   #13
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,586
Karma: 6299993
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
not really. IIRC something similar was suggested before.

"Behind you all the way".

Niluje has swapped to a nice new shiny latest toolchain ultimately using the native processing more efficiently; over the course of a project such tiny improvements can of course add up to making a difference so I'm behind you all the way.
twobob is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
B&N, make a bigger, higher DPI e-ink reader already! JWez Barnes & Noble NOOK 11 06-28-2013 03:53 PM
New to Calibre. Efficiency suggestions? Mikey1969 Library Management 1 06-26-2012 06:55 PM
is it possible to make calibre just use one CPU? booksonthemove Calibre 1 02-20-2010 04:55 PM
Power efficiency bellosguardo Sony Reader 5 07-10-2009 03:15 AM
Reference Bennett, Arnold: Mental Efficiency, v1, 12 Dec 2007. Patricia BBeB/LRF Books 1 12-11-2007 09:09 PM


All times are GMT -4. The time now is 06:39 PM.


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