JuliaLang / PrecompileTools.jl

Reduce time-to-first-execution of Julia code
MIT License
209 stars 12 forks source link

Difficulty finding how to disable precompile workloads in docs #34

Open IanButterworth opened 8 months ago

IanButterworth commented 8 months ago
timholy commented 8 months ago

https://julialang.github.io/PrecompileTools.jl/stable/#Package-developers:-reducing-the-cost-of-precompilation-during-development

If this is missing something, let's fix it!

IanButterworth commented 8 months ago

Oof. Sorry. This is a case of the Docs search not helping.

I knew the solution was Preferences based, so I searched for Preferences and got https://julialang.github.io/PrecompileTools.jl/stable/search/?q=preferences

If you go onto the first 2 results and search on the page for Preferences there's no results (it seems to be preferring similarity to "reference" over actual occurrences of "preferences")

Perhaps making the title of section you linked to 'Disabling precompile workloads via Preferences` would've helped my case... But maybe the current title is better for people that don't even know about Preferences..

SEO is hard..

Feel free to close

IanButterworth commented 8 months ago

New docs search is even worse

image

timholy commented 8 months ago

Yikes. CC @mortenpi, anything to be done about this? If you do a page-search with Firefox, "preferences" appears 8 times on the page. You have to use the dev branch https://julialang.github.io/PrecompileTools.jl/dev/ since we haven't yet tagged a release with this change.

mortenpi commented 8 months ago

No easy solution I suspect. Could be because of the way we write out the search index. I suspect it might be the same issue as in https://github.com/JuliaDocs/Documenter.jl/issues/2114.

timholy commented 8 months ago

If it helps, PrecompileTools is a tiny package and thus has tiny docs compared to base Julia, which might be easier for debugging?

I hadn't previously dug into the search index, but I see a file, search_index.js, in the build directory. I've copied it into a gist, along with a variant that I converted from js to json so that I could more easily load it into Julia. I'm not quite sure how this data is used for searching, but I do notice some entries that contain "Preferences", e.g.,

{
      "location": "index.html",
      "page": "Home",
      "title": "Home",
      "text": "If you're frequently modifying one or more packages, you may not want to spend the extra time precompiling the full set of workloads that you've chosen to make fast for your \"shipped\" releases. One can locally reduce the cost of precompilation for selected packages using the Preferences.jl-based mechanism and the \"precompile_workload\" key: from within your development environment, use",
      "category": "page"
    }

Here's another funny thing: if I enter "Preferences" into the search bar I get nothing. If I enter "Preferences.jl" into the search bar, I get a set of hits that seem plain wrong, unless you count matching the ".jl" in "Powered by Documenter.jl and the Julia Programming Language" that appears in the footer of each page.