Blender start with (large) Python script crashes Blender
If you are trying to add one object per polygon, then yes, it is a quite bad idea with current Blender - adding object can indeed be O² because each time you add one, Blender has to check all (or at least a large subset) of existing ones against name collision. Would suggest to add your 12000 polygons in a single object…

Further than that, it's pretty much impossible to help you without having access to the code.