問題描述
jGRASP 上的編譯時間很慢——為什麼? (Slow compile times on jGRASP ‑‑ why?)
抱歉,我問了一個更技術性的問題,但我現在很困惑。今年我的一些 AP 學生在他們的 MacBook(優勝美地)上使用帶有 Java 7 的 jGRASP 遇到了一個奇怪的情況,一天的第一次編譯通常需要幾分鐘才能完成。任何程序的後續重新編譯幾乎都是立即進行的,就好像沒有問題一樣。第二天,問題又出現了。
有什麼可能導致這個問題的想法嗎?我已經要求學生下載 JDK 和 jGRASP 並重新安裝它們,但這似乎並不能解決問題。班上其他機器設置看似相同的學生沒有問題。好困惑???
謝謝!羅傑
參考解法
方法 1:
Most likely this is an issue with the file system cache. Have them try entering the "purge" command in a terminal, and see if the problem repeats immediately afterward. I'm not familiar with diagnosing such problems, but that would at least point you in the right direction. One obvious "cause" would be too many applications running (or not enough memory).
If that isn't it, have them compile from the command line for the first compile of the day, and see if it repeats. That will tell you if it is jGRASP or javac that is triggering the problem (I say triggering, because some OS issue is most likely the actual cause).
(by user2356530、lbarowski)