Speed up V4 pos screen by limiting pre-loaded item count

Hello Sirs; some few weeks ago I made request for the ability to reduce the number of items that are pre-loaded on the POS screen to speed up the module and that was nicely sorted; the POS module is many times faster when you make it load just a small set of items like the first 24; as opposed to looading all. thanks to rmehta and others who threw in suggestions.

I will like to do the same thing on the V4 inside the pos.py file; I have tried adding the ‘limit’ just before the ‘where’ line but it creates an error in the pos screen when reloaded.

Could someone help with a way to reduce the number of pre-loaded items to a small number, rather than pulling the entire stocks on each pass, so that it speeds up the pos screen regardless of number of actual items; as such normal search and scanning can proceed; but on first load or with nothing scanned or being searched; the script just loads a few items for preview.

Thanks as always for your help! I anticipate.