使用 Leiningen 在 Raspberry Pi 上缩短 Clojure REPL 的启动时间 [英] Improving startup time of Clojure REPL with Leiningen on the Raspberry Pi

查看:18
本文介绍了使用 Leiningen 在 Raspberry Pi 上缩短 Clojure REPL 的启动时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Rasperry Pi 512 MB 版本(2012 年末)并安装了 Java SE 8 for ARM 的开发者预览版就可以了.当我使用 Leiningen 创建一个新的 Clojure 项目并通过执行 lein repl 启动 nREPL 时,需要两分钟多一点(大约 130 - 140 秒),直到 REPL 初始化并可以使用.

I got a Rasperry Pi 512 MB version (late 2012) and installed the Developer Preview of Java SE 8 for ARM on it. When I create a new Clojure project with Leiningen and launch the nREPL by doing lein repl it takes a bit more than two minutes (roughly 130 - 140 seconds) until the REPL has been initialized and can be used.

直接启动JAR文件java -jar clojure-1.4.0/clojure-1.4.0REPL会在25秒内启动.

When launching the JAR file directly java -jar clojure-1.4.0/clojure-1.4.0 the REPL starts up in 25s.

我使用的是快速 10 级 SD 卡(SanDisk Extreme,速度高达 30 MB/s).为什么使用 Leiningen 和 nRepl 与启动 JAR 文件之间的区别如此之大?使用 Leiningen 可以做些什么来改善 Raspberry Pi 的启动时间?

I'm using fast class 10 SD cards (SanDisk Extreme with up to 30 MB/s). How come that the difference between using Leiningen with nRepl vs launching the JAR file is so big? What could be done to improve the startup time with Leiningen for the Raspberry Pi?

推荐答案

也试试 grenchman:快速调用nREPL 上的 Clojure 代码.

Also try grenchman: Fast invocation of Clojure code over nREPL.

这篇关于使用 Leiningen 在 Raspberry Pi 上缩短 Clojure REPL 的启动时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆