Git Product home page Git Product logo

clojure's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

clojure's Issues

Dex creation using [android/clojure "1.5.0"] fails with an OutOfMemoryError

Using alexander yakushev's version of neko and [android/clojure "1.5.0"] in project.clj, the android app I'm building fails to build on the DEX creation stage.
Since java6 is needed for Android I added the forkjoin lib ([org.codehaus.jsr166-mirror/jsr166y "1.7.0"]) to project.clj but I get an OutOfMemoryError when creating the DEX file:

UNEXPECTED TOP-LEVEL ERROR: java.lang.OutOfMemoryError: Java heap space at com.android.dx.cf.code.ExecutionStack.(ExecutionStack.java:55) at com.android.dx.cf.code.ExecutionStack.copy(ExecutionStack.java:66) at com.android.dx.cf.code.Frame.copy(Frame.java:98) at com.android.dx.cf.code.Ropper.processBlock(Ropper.java:683) at com.android.dx.cf.code.Ropper.doit(Ropper.java:639) at com.android.dx.cf.code.Ropper.convert(Ropper.java:252) at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:256) at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:134) at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:87) at com.android.dx.command.dexer.Main.processClass(Main.java:487) at com.android.dx.command.dexer.Main.processFileBytes(Main.java:459) at com.android.dx.command.dexer.Main.access$400(Main.java:67) at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:398) at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:245) at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:131) at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:109) at com.android.dx.command.dexer.Main.processOne(Main.java:422) at com.android.dx.command.dexer.Main.processAllFiles(Main.java:333) at com.android.dx.command.dexer.Main.run(Main.java:209) at com.android.dx.command.dexer.Main.main(Main.java:174) at com.android.dx.command.Main.main(Main.java:91)

BTW: I tried using JVM args on my desktop to increase stack and heap sizes to no avail.

increase agent stack size

Per default newly created threads have a stack size of 8kb on Android/Dalvik which is a lot less than the usual 256-512 kB on a 'normal' JVM. This limit is easily hit when e.g. "eval"-ing moderately complex expressions.

In places where one is in control of creating new threads in one's own project one can easily use the Thread constructor that allows one to specify a stack size. However Clojure creates threads implicitly, e.g. for agents.

Changing createThreadFactory in clojure.lang.Agent fixes this:

private static ThreadFactory createThreadFactory(final String format, final AtomicLong threadPoolCounter) {
return new ThreadFactory() {
public Thread newThread(Runnable runnable) {
return new Thread(Thread.currentThread().getThreadGroup(),
runnable, String.format(format, threadPoolCounter.getAndIncrement()), 256 * 1204);
}
};
}

This could be amended to only explicitly set the stack size explicitly if the DalvikVM has been detected and leave it to the default otherwise.

Question - onTouchEvent very slow

Hello

I am trying to convert the tutorial http://developer.android.com/guide/topics/graphics/opengl.html to Clojure using the fork I found on this site (also using the main 1.4 release but with the same result)

The issue is that the onTouchEvent is behaving very slow.

Logcat says

05-06 11:03:30.680: INFO/InputDispatcher(170): Application is not responding: Window{4143d7f0 com.example/com.example.Activity paused=false}. 9270.0ms since event, 5001.9ms since wait started
05-06 11:03:30.680: INFO/WindowManager(170): Input event dispatching timed out sending to com.example/com.example.Activity

Might be related to how Clojure generates separate java class per overridden/implemented method, but I have no real clue

Any tips would be warmly welcomed as currently, my planned pet project to play around with opengl on android using Clojure seems pretty unworkable

Many thanks

Peter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.