|For starters, we need your system specs or the make/model of your computer. If you have a old/slow processor & too little RAM, there's only so much that can be done to improve performance.|
"the machine is not connected to internet but has all kinds of popup"
Was it ever connected to the internet? If so, how recently? Do you ever plug in USB devices such as jump drives or external HDDs? They can become infected & then transfer the infection to the host computer. Did you run a scan for viruses & malware?
Start by downloading & running CCleaner. Get either the portable version or the slim version. Run the Cleaner & remove everything it finds. Then click on Tools > Startup & review what's on the list. Very few items are actually necessary. The more that's on the list, the slower the boot time.