queue.lua: reduce added

reduce function reduces queue in order to save RAM