In the real world, science is overwhelmingly mundane, be it the daily task of feeding the lab rats or the statistics bit afterwards. Making breakthroughs takes many years filled with often-uninteresting labor, and the scientists more often than not never know if or when a breakthrough will come. But that sort of thing doesn't make a very good plot device; after all, success should be a function of willpower, not patience or luck. So, in fiction, science, engineering, and even building technological wonders don't take any time, because taking time is boring. This is why someone with science powers can figure out which polarity to reverse at the last moment, or throw together an improvised death ray in an action scene.
Of course, an author can always throw in a good Hard-Work Montage to allow the viewer to skip the boring part; this trope allows the protagonists to skip it as well.
Alternately, doing science can take just long enough to create suspense. Since the "Eureka!" Moment is the ostensibly most satisfying part of scientific work, everything after it will then be near-instantaneous; isolating the right chemical, for example, will be the hard part and then manufacturing enough of it to use will be faster than making morning coffee.
Like most Hollywood Science tropes, this usually skips important portions of the scientific method. Real science is all about meticulous certainty, but plots tend to feel better when a little elbow grease sends us straight from wild hypothesis to cool gadget.
Note that Tropes Are Not Bad; there have certainly been real life cases where a sudden perceived need prompted a massive (and massively-funded) research project that resulted in the desired science being developed in a relatively short time (such as the Manhattan Project in World War II, driven by the suspicion that the Nazis were working on their own atomic bombs). Funding is the most reliable way, but of course there are also examples where people got lucky. For example, on one occasion the inventor Walter Hunt found himself in debt and unable to pay. His creditors gave him a length of wire and a challenge to come up with a marketable invention. In just three hours he conceived of, prototyped, and sold the first safety pin.
- Marvel Comics is fond of this trope. Often, a hero will explain their hypothesis about how the science behind an action should work according their own scientific knowledge, or discover and explain a previously unknown scientific property of some aspect of their powers or abilities, at the very same time they are using those powers, often for the first time, in combat, during life threatening situations. Luckily for these characters, their powers will protect them.
- Mega Man: Defender of the Human Race averts this with Light and Wily's greatest creations.
- Dr. Light has apparently begun work on X, but he hasn't even left the drawing board yet, several months of which were spent just on the basic design and the armor upgrades. Of course, this is to be expected given X is far and above any robot of his time with true free will and limitless potential and, if it's like game canon, Light won't have him done until he's practically on death's door.
- While Dr. Wily does manage to slap Zero together in a little over a year, it's only because he worked on it non-stop and spent considerable time and effort acquiring the funds and the power source to focus on a pure killing machine. And then he can't even turn him on because Zero's advanced AI is too much for his tech to do right away and riddled with errors.
- In The Amazing Spider-Man, Peter gets bitten by a spider and it only takes him one subway trip for his powers to manifest. A three-legged mouse gets a serum injection and overnight it grows a new leg. Dr. Connors takes the serum, grows back his arm in an hour, and in half an hour mutates into the Lizard. Gwen has to synthesize an antidote, and it only takes her under an hour.
- Iron Man: In a time frame of weeks Tony Stark develops and constructs a miniaturized arc reactor small enough to fit in his chest in a cave, with a box of scraps. Actually somewhat justified, as he had been involved to some degree with the construction of a larger-scale arc reactor, and it's implied he had been considering advancing that technology before his kidnapping. That and the shrapnel in his chest that he was building to keep it from tearing his heart to shreds probably gave him a whole lot of motivation.
- Parodied in The Iron Dream, where the Story Within a Story is a wish-fulfillment fantasy of a para-Third Reich going from roughly 1930s technology to cloning and starships within the lifetime of its protagonist.
- The Lensman novels by E.E. "Doc" Smith are not exclusively this trope, but it's definitely a major component — to the point that during the playtest of the licensed GURPS adaption in 1993 there were jokes about engineers in the setting saying things like, "Hey — if we add a tube here, we can go up two Tech Levels by the weekend!"
- Sometimes this is justified by the protagonists not knowing they would need something that could X before they suddenly did need it and going on a crash research program to develop it. Sometimes it's that the scientists have had the ability to X for some time, but didn't know it would be of other than academic interest until the protagonists ask them about it. And sometimes they just happen to develop exactly what they need just before they need it.
- Parodied in Redshirts with the Box, a microwave-like device that just appeared in the Intrepid's science department one day. Stick the ingredients and data of a problem into it, and it will provide the solution whenever it's most dramatic. Turns out it's a result of a Star Trek-like TV show intruding on Intrepid's reality and forcing it to follow scripts featuring questionable science.
- Lampshaded in The Guns of the South. When Colonel Gorgas, the Confederacy's top explosives expert, kicks himself for not being able to figure out smokeless gunpowder as fast as he'd like, General Lee bluntly states that The Smart Guy having the Applied Phlebotinum rejiggered and ready exactly when The Hero needs it is something that only happens in stories, and that he does not share Gorgas' doubts in his own abilities.
- A big one for this is of course all the CSI series and their famous five minute forensics. Most real forensic tests take a few hours each to complete and getting the results back to the necessary people can take months simply because the labs are all constantly backlogged and most real police departments can't afford the various equipment for themselves. Virtually all police procedure shows work like this, as a show bringing up cases opened in previous episodes would be considered incredibly confusing to anyone not following the show closely.
- In Batman: Arkham City, the Joker is ill and wants Batman to get Mr Freeze to finish making the cure he was working on before the Penguin kidnapped him. Justified in that Mr Freeze had done an awful lot of work before Batman showed up, stymied only by a really difficult problem for which he had a hypothetical solution he couldn't actualize. Played straight in that when Batman hands him the ingredient he needs, he plugs it into a machine and five seconds later gets an ample quantity of cure.
- Used repeatedly in the Mass Effect series:
- In Mass Effect 2, Prof. Mordin is set on the task of developing countermeasures against the Collector swarms. Regardless of whether you recruit him first or last of the initial batch of dossiers, he always produces viable results before the first major encounter with the Collectors.
- The Crucible in Mass Effect 3. Plans were found in an ancient Prothean archive and no one alive understands how it works, much less what it's even supposed to do, but somehow it gets built in a matter of weeks. Handwaved by the plans supposedly being very easy to follow. Plus, if you can't dig up enough people and equipment for the project it might destroy Earth completely instead of just killing the Reapers in orbit around it.
- X Com Enemy Unknown plays with this trope a bit. On the one hand it's played straight, since the scientists you have on your team work blindingly fast. On the other hand the trope is also inverted, since at several points the plot refuses to advance until the science is done...which can take weeks. Researching, constructing, and launching a Firestorm can take more than a month, and you haven't a prayer of taking down those faster UFOs until you do.
- Stand Still, Stay Silent has an aversion existing side by side with a straight case. One of the members of Mission Control used to work for an institute that has been looking for a Rash cure for fifty years and found nothing. Meanwhile, the main cast discovers that a vaccine or cure may have been discovered Just Before the End, but never made it to the surviving pockets of civilization. Given how fast the Rash spread, that had to mean discovering that cure over the course of a few months, which is a really short time to find a cure to a brand new disease in reality. The discovery of a working cure is eventually confirmed, but this comes with the news it had Gone Horribly Wrong possibly because it treated only the physical aspects of a partially supernatural disease.
- One Saturday Morning Breakfast Cereal strip aptly sums it up. Movie science can solve any problem in ninety minutes. Real world science will take a decade to prove all the ways that it can't be done...and then come up with another possibility to test.
- In Justice League: Doom, when the phasing device is activated, it's pointed out that there was literally only one field test and it had never been designed to be used the way it was.
- In The Legend of Korra, Hiroshi Sato develops the first heavier than air aircraft in the world of Avatar and makes them capable of bombing war ships accurately while he's at it. In Real Life, the latter was a complex process of trial and error that took decades until after the Wright Brothers.
- During the Danny Phantom finale, the pressure from the Disasteroid manages to inspire the whole world to deter it with space missiles and space missions at amazingly fast rates. Handwaved by Jasmine saying "If it weren't for Vlad's money, we wouldn't be doing this so fast". However there is little excuse for being able to do all this and have Danny propose/create a machine that covers the entire Earth in the time allotted before the Disasteroid would crush Earth.
- The Looney Tunes Show has the episode "Peel Of Fortune," wherein Bugs Bunny constructs a time machine in his garage in a matter of seconds to undo history so that Daffy Duck never invents the electric carrot peeler.
- In Wild Kratts, it doesn't take anything more than just finding an animal and stating a fact about it before Aviva can make a corresponding gadget to model it. Doubly so, because the Kratts can instantly start using those devices without any prior training to learn how to pilot them regardless of complexity.
- In Joe Oriolo Felix the Cat episode 59, "The Leprechaun's Gold", the Professor quickly invents a gun which can magnetically attract gold.
- The Manhattan Project went from well-thought-out concept to working prototype in six or seven years, with the aid of world-class funding, extremely capable scientists, engineers, and administrators, and a sense of real global-scale urgency.
- The safety pin. On April 10th, 1949, the inventor Walter Hunt found himself unable to pay a debt of $15 to his draftsmen, William and John Richardson. The Richardsons gave him a length of wire and a challenge to come up with a marketable invention. In just three hours he conceived of, prototyped, and sold the first safety pin, giving the Richardsons the rights for $400 (minus his debt to them).
- The reality TV show Make 48 challenges participants to conceive of, prototype, and finally pitch a gadget to investors in just 48 hours. This isn't presented in a way which instantiates the trope, but in real-life terms it's closer than the other examples so far.