I have a image generator which samples a few fairly large datasets (around 10K words per category).

The user selects a dataset , from which a word is randomly selected.

As such , I only need to load the dataset which is currently selected.

I’d like for the other datasets to be un-loaded until the user selects them.

Is there a way to do this?

Or , can this problem be resolved by other means?

  • VioneT@lemmy.worldM
    link
    fedilink
    English
    arrow-up
    3
    ·
    8 months ago

    The way the imports work, Perchance first checks the code for the imports, and then imports them before loading the page to avoid errors.

    Currently, we don’t know a way to load an import only if they are to be used, which is the purpose of the post.