C4W2 Data Preprocessing. Unclear how you can avoid the delay

I recognise all these preprocessing steps as important for ML training and inference.

What is unclear to me though is what part of this preprocessing you can pre-cache, thereby saving you some computation and improving latency/throughput/cost.

You have some input text, for example, that comes in for some inference to be output.
Surely you will always need to perform the same pre-processing on it. I don’t see any shortcuts to this.
If you have already cached the pre-processed data for that same specific text, great but then surely you’ll still need to compare the two sets of text, then map it to the already pre-processed form. This array/string search & compare etc computations are not for free, and perhaps that could take even longer than just performing the preprocessing on it anyway…

Am I completely missing the point ?

Consider a case where one of your model features is transaction_amount.

Assuming your transactions are from different countries, you’ll need to convert all these into a standard currency, say, USD.
Assuming that it’s alright to have minor errors in translating from say, GBP to USD, you can either make an external query to a currency exchange service to get the latest rate or you can cache all conversion values to USD.

2nd options is preferred since the conversion table becomes part of the lineage and of course, the preprocessing is made faster with a cache.