mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-10 10:10:21 +08:00
memorize the calculated file dependencies. Thanks to Ignacio Piantanida for the patch.
http://hipbyte.myjetbrains.com/youtrack/issue/RM-466 * before % time rake ... snip ... rake 38.41s user 2.77s system 101% cpu 40.515 total * after % time rake ... snip ... rake 18.01s user 1.64s system 89% cpu 21.877 total
This commit is contained in:
@@ -236,14 +236,17 @@ module Motion; module Project
|
||||
end
|
||||
|
||||
def file_dependencies(file)
|
||||
deps = @dependencies[file]
|
||||
if deps
|
||||
deps = deps.map { |x| file_dependencies(x) }
|
||||
else
|
||||
deps = []
|
||||
@known_dependencies ||= {}
|
||||
@known_dependencies[file] ||= begin
|
||||
deps = @dependencies[file]
|
||||
if deps
|
||||
deps = deps.map { |x| file_dependencies(x) }
|
||||
else
|
||||
deps = []
|
||||
end
|
||||
deps << file
|
||||
deps
|
||||
end
|
||||
deps << file
|
||||
deps
|
||||
end
|
||||
|
||||
def ordered_build_files
|
||||
|
||||
Reference in New Issue
Block a user