Importing sklearn takes too much time compared to other imports except spaCy

### Describe the bug

              Can you open a separate issue please with more details about your problem?

In particular, please include the following information in your new issue:
- is this a regression in scikit-learn 1.5, i.e. did your code work scikit-learn 1.4?
+ I tested other versions still same but it's slower than compared to older versions probably due to new features etc. But 1.5.1 less problematic than 1.5
- ideally a stand-alone snippet that reproduces the behaviour on your machine and that others can try to run. Without a stand-alone snippet to reproduce, there is very little we can do to help ...
`import sklearn` Takes 155 seconds to load. 
`from sklearn.metrics.pairwise import cosine_similarity` 384 seconds in my machine at python 3.12 and scikit-learn version 1.5.1 Windows 11 Latest version of Windows SDK and VM with 8gb ram. Other modules loaded less than 1 seconds. Full code of script: https://github.com/HydraDragonAntivirus/HydraDragonAntivirus/blob/main/antivirus.py
_Originally posted by @lesteve in https://github.com/scikit-learn/scikit-learn/issues/29145#issuecomment-2334105586_


### Steps/Code to Reproduce

`from sklearn.metrics.pairwise import cosine_similarity` 

### Expected Results

Excepted: Loaded in 2 minutes

### Actual Results

Results: `import sklearn` takes 155 seconds, `from sklearn.metrics.pairwise import cosine_similarity` takes 384 seconds

### Versions

```shell
Main machine: 
 python: 3.12.5 (tags/v3.12.5:ff3bc82, Aug  6 2024, 20:45:27) [MSC v.1940 64 bit (AMD64)]
executable: c:\Users\victim\AppData\Local\Programs\Python\Python312\python.exe
   machine: Windows-11-10.0.22631-SP0

Python dependencies:
      sklearn: 1.5.1
          pip: 24.2
   setuptools: 73.0.1
        numpy: 1.26.4
        scipy: 1.14.1
       Cython: 3.0.11
       pandas: None
   matplotlib: None
       joblib: 1.4.2
threadpoolctl: 3.5.0

Built with OpenMP: True

threadpoolctl info:
       user_api: openmp
   internal_api: openmp
    num_threads: 16
         prefix: vcomp
       filepath: C:\Users\victim\AppData\Local\Programs\Python\Python312\Lib\site-packages\sklearn\.libs\vcomp140.dll
        version: None

       user_api: blas
   internal_api: openblas
    num_threads: 16
         prefix: libopenblas
       filepath: C:\Users\victim\AppData\Local\Programs\Python\Python312\Lib\site-packages\numpy.libs\libopenblas64__v0.3.23-293-gc2f4bdbb-gcc_10_3_0-2bde3a66a51006b2b53eb373ff767a3f.dll
        version: 0.3.23.dev
threading_layer: pthreads
   architecture: Zen

       user_api: blas
   internal_api: openblas
    num_threads: 16
         prefix: libscipy_openblas
       filepath: C:\Users\victim\AppData\Local\Programs\Python\Python312\Lib\site-packages\scipy.libs\libscipy_openblas-5b1ec8b915dfb81d11cebc0788069d2d.dll
        version: 0.3.27.dev
threading_layer: pthreads
   architecture: Zen
```
Notice: spaCy takes 1469 seconds to load.
Possible solution: Use multithreading or something similar at loading of import.

COMMENT:
I am closing this issue because 4GB Ram laptop much faster than my laptop. I thought there must be something wrong in my 16GB Ram computer and it's not so old. That's why I use 4GB Ram laptop. Thank you for your answers.  It helped me a lot of. Edit: 16GB laptop says it's not loaded even if it's loaded to joblib while doing sys to make sklearn externals joblib to joblib. It's biggest proof of my laptop is broken. Now I'm going to test on python 3.12.5 instead of 3.11.9 at 4GB Ram laptop.
```
time module loaded
sys module loaded in 0.000000 seconds
os module loaded in 0.000000 seconds
shutil module loaded in 0.032971 seconds
subprocess module loaded in 0.003889 seconds
threading module loaded in 0.000000 seconds
re module loaded in 0.007238 seconds
json module loaded in 0.002051 seconds
PySide6.QtWidgets modules loaded in 0.364171 seconds
PySide6.QtCore modules loaded in 0.035042 seconds
PySide6.QtGui.QIcon module loaded in 0.002471 seconds
sklearn module loaded in 2.684568 seconds
joblib module loaded in 0.000000 seconds
pefile module loaded in 0.014225 seconds
zipfile module loaded in 0.002656 seconds
tarfile module loaded in 0.004740 seconds
yara module loaded in 0.020737 seconds
yara_x module loaded in 0.020745 seconds
psutil module loaded in 0.000000 seconds
notifypy.Notify module loaded in 0.071240 seconds
logging module loaded in 0.000000 seconds
concurrent.futures.ThreadPoolExecutor and as_completed loaded in 0.002089 seconds
watchdog.observers.Observer module loaded in 0.024145 seconds
watchdog.events.FileSystemEventHandler module loaded in 0.000000 seconds
time module loaded in 0.000000 seconds
win32file module loaded in 0.011536 seconds
win32con module loaded in 0.005961 seconds
datetime.datetime and timedelta modules loaded in 0.000000 seconds
winreg module loaded in 0.000000 seconds
scapy modules (IP, IPv6, DNS, DNSQR, DNSRR, TCP, UDP, sniff) loaded in 0.654361 seconds
ctypes module loaded in 0.000000 seconds
ipaddress module loaded in 0.001994 seconds
sklearn.metrics.pairwise.cosine_similarity module loaded in 0.202955 seconds
numpy module loaded in 0.000000 seconds
io module loaded in 0.000000 seconds
spacy module loaded in 2.121354 seconds
codecs module loaded in 0.000000 seconds
csv module loaded in 0.000000 seconds
elftools.elf.ELFFile module loaded in 0.135543 seconds
struct module loaded in 0.000000 seconds
zlib module loaded in 0.000000 seconds
marshal module loaded in 0.000000 seconds
base64 module loaded in 0.000000 seconds
base32_crockford module loaded in 0.003992 seconds
binascii module loaded in 0.000000 seconds
Total time for all imports: 6.469864 seconds
```

Labels: Bug, Needs Info