Skip to content

Commit

Permalink
Enable precompilation (#2456)
Browse files Browse the repository at this point in the history
Run some `precompile` statements generated using SnoopCompile in the precompilation
phase.

In addition to this, the new `DataFrames.precompile(true)` function
precompiles all methods that are used when running tests.
This is useful to run benchmarks like H2Oai where the time of the first run should
include the time needed to specialize on a particular operation on a particular
dataset, but not the time needed for the more general compilation of common parts.
It could also be useful for users who would like to generate a precompiled image.
  • Loading branch information
nalimilan authored Nov 10, 2020
1 parent 636f4dc commit 9ab87cd
Show file tree
Hide file tree
Showing 5 changed files with 3,224 additions and 1 deletion.
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,8 @@
* limit the maximal display width the output can use in `text/plain` before
being truncated (in the `textwidth` sense, excluding ``) to `32` per column
by default and fix a corner case when no columns are printed in situations when
they are too wide ([2403](https://github.com/JuliaData/DataFrames.jl/pull/2403))
they are too wide ([#2403](https://github.com/JuliaData/DataFrames.jl/pull/2403))
* Common methods are now precompiled to improve responsiveness the first time a method
is called in a Julia session. Precompilation takes up to 30 seconds
after installing the package
([#2456](https://github.com/JuliaData/DataFrames.jl/pull/2456)).
3 changes: 3 additions & 0 deletions src/DataFrames.jl
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,7 @@ include("deprecated.jl")

include("other/tables.jl")

include("other/precompile.jl")
precompile()

end # module DataFrames
Loading

0 comments on commit 9ab87cd

Please sign in to comment.