GC.disable will disable garbage collection. Languages ββlike ruby ββdo not have the ability to free memory without garbage collection, because unlike C, you do not manually call up memory in memory.
So yes, there will be a performance hit. In the end, you will run out of memory, because objects such as strings will be constantly created and never cleared. You cannot even be held responsible for the fact that the internal mechanics of the API you are using can generate objects.
Without a better understanding of the problem, this is, unfortunately, the best I can offer.
source share