How can I disable bpy.ops.convert objects sorting? I would like to iterate through all objects in my scene and change their type to Mesh using script. It works, however after every iteration blender sorts all objects on the map (I've got over 130 000 objects). It is realy slowing down the process. 

Is there a way to disable it through some function or just modify convert function in Blender source code? (I've tried to look for it but I failed, do someone knows where is it exactly?)

Or maybe there is another way to convert curves to meshes or optimize it?  

Thanks in advance for any help. Cheers

My convert function:

def to_mesh(obj):
    obj.select = True
    bpy.context.scene.objects.active = obj
    bpy.ops.object.convert(target = 'MESH')
    obj.select = False




Console output. I think that the process is so slow because convert sorts all objects after operation (ordered on the top), or am I wrong?
Run the operator once for all curves

I imagine you are getting poor performance because you are running the operator for each curve object, rather than once for all.  See Python performance with Blender operators

Suggest selecting all the curves in scene, and running the operator once, example test code.

import bpy

context = bpy.context

# select only curves
for o in context.scene.objects:
    o.select = o.type == 'CURVE'

curves = context.selected_objects
if curves:
    # just in case context object not a curve
    if not context.object.select:
        context.scene.objects.active = curves[0]
    # convert them all
    bpy.ops.object.convert(target='MESH')


As for the sorting, that's just what blender does in its background processing, and is I doubt responsible for slowing down your blender.

There is also the Object.to_mesh which can be used to convert the curve to mesh without using the operator. However in this case I think selecting all curves and converting with one operator call is sufficient.