Install more RAM ( 512MB or more ). If XP you definately want at least 512 instead of 256, most XP systems of the P4 flavor came with 128 or 256 Ram, and worst off is if you have integrated video that eats up to 64MB into the 128 or 256, so then XP is running on in your case potentially only 192MB Ram. Home is more forgiving at 192MB than XP Professional.
Ram should be a cheap solution maybe $20 for a 256MB stick. Be sure to get PC2100 for 266 MHz FSB Ram, PC2700 for 333MHz FSB DDR Ram, or PC3200 for 400MHz FSB DDR Ram. Most Ram have a sticker on them specifying 2100, 2700, or 3200 for the P4 flavor, and if one of the very first P4 systems less than 2.0 Ghz you may find it needs PC-100 on a rare occasion, but more common for first generation PC-133 Ram as SDRAM. You can always search through Google for others selling your same system to get specs or get specs through PC MFR if you are unsure.
Check for Disk Fragmentation on your hard drive and clean up fragmentation through Defrag to clean up the swap file that the task is temporarily spooled to in the spooler service.
USB 1.1 and 2.0 can make a difference as posted before, but I'd start with RAM and bring it to at least 512MB for Windows XP, assuming you are using XP Home or Professional.
Also check to make sure the CPU Fan and Heatsink are not clogged with dust ... P4 systems have Thermal Throttling to slow the CPU when running too hot. A clogged fan and heatsink will cause the P4 to run like a P1 if having to Thermal Throttle.
Dave