Performing the following (note the range of 10,000):

`importmulti '[{"desc": "sh(wpkh([aeee1e6a/49h/1h/0h]tpubDC5bVdaveQYxGFztMShFAjU637kKjrs9FD8ne1oHR7z8tLeQJExsaxWRVeSpcCcYMdp5ecf2LQhuVaeYFZ7YEpvWTJr4nDGUJrmuvLuTSsp/1/*))", "keypool": true, "timestamp": "now", "watchonly": true, "internal": true, "range": {"end": 1000}}]' '{"rescan": false}'`

takes many minutes. @achow101 reports a similar import taking 6 minutes on his machine.
{
    return memcmp(value, &rhs.value, sizeof(value)) == 0;
}
static void SplitWalletPath(const fs::path& wallet_path, fs::path& env_directory, std::string& database_filename)
{
    if (fs::is_regular_file(wallet_path)) {
        
        
        
        env_directory = wallet_path.parent_path();
        database_filename = wallet_path.filename().string();
    } else {
        
        
        env_directory = wallet_path;
        database_filename = "wallet.dat";
    }
}
bool IsWalletLoaded(const fs::path& wallet_path)
{
    fs::path env_directory;
    std::string database_filename;
    SplitWalletPath(wallet_path, env_directory, database_filename);
    LOCK(cs_db);
    auto env = g_dbenvs.find(env_directory.string());
    if (env == g_dbenvs.end()) return false;
    auto database = env->second.lock();
    return database && database->IsDatabaseLoaded(database_filename);
}
fs::path WalletDataFilePath(const fs::path& wallet_path)