Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Sign Up
Dashboard
Clojure Design
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
Colour
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Undo
Redo
Keyboard Shortcuts Help
<h3>Rationale</h3> <p>Android is an important target for JVM languages. Clojure should run well there</p> <h3>Plan</h3> <ul> <li>Figure out what works and what doesn't <ul> <li>find it and write it up</li> </ul> </li> <li>Fast startup</li> <li>Small footprint <ul> <li>Selectively strip metadata?</li> </ul> </li> </ul> <h3>Issues</h3> <ul> <li>Needs a motivated owner</li> <li>Be careful not to compromise Clojure for base and other platforms in making Android work well</li> <li>Will we need some sort of conditional compilation?</li> </ul> <h3><span style="color: rgb(0,0,0);"><strong>Findings</strong></span></h3> <ul> <li>Works out of the box with 1.2.0+ <ul> <li>But only with API level 8 (FroYo/2.2) and above</li> <li>API level 7 (Eclair/2.1) works if a work-around can be added for <a href="http://code.google.com/p/android/issues/detail?id=5697">this bug</a></li> <li>API level 6 and lower fail during verification due to the bean function. Given that market share of these platforms is less than 10% and falling, probably a low priority to fix it.</li> </ul> </li> <li>Startup time is a little sluggish, but not too bad</li> <li>The bean function causes some unnecessary GC and load time</li> <li><span style="text-decoration: line-through;">zip, xml, and set loading in RT.java add 1-2 seconds on to the load time</span> (fixed)</li> <li><span style="text-decoration: line-through;">Average load time for a hello world app on stock clojure is 8-9 seconds using my macbook pro and the android emulator running Froyo</span></li> <li>Average load time for a hello world app drops to around 5 seconds with the bean function removed and zip, set, and xml removed from the load in RT.java</li> <li>Clojure adds =~ 4MB of overhead on application size (without any metadata stripped) <ul> <li>Standard Hello Android on Java: 20.01KB</li> <li>Standard Hello Android on Clojure: 4.21MB</li> <li>Can be reduced using ProGuard to strip out unused namespaces.</li> <li>However, namespaces are cannot be broken up.</li> </ul> </li> <li>Dynamic compilation <ul> <li>It is possible to add, but it is slow</li> <li>Some forms fail to compile due to excessive stack use, e.g. <table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre> (for [x (range 5) y (range 5)] [x y]) </pre></td></tr></table></li> </ul> </li> </ul>
Attachments
Labels
Location
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced