Python script performing boolean operations slowing down
After some experimenting I found two things that can improve performance.

First is the mesh you are cutting into, cutting holes into a large face is slower than if it was subdivided into many faces, this would be making it easier for the boolean operation to find connecting edges.

For example the subdivided object on the right will give a faster boolean result than the single faced object on the left, by faster I mean it can cut the time almost in half.



In my testing I was starting with a cube so I could do a simple subdivide. With your extruded shape you may want to add loop cuts across your larger faces so you don't add unneeded cuts to smaller bevel edges etc.

For the second speedup, the really odd thing is that your approach of using one drill object that you move and reuse for each hole seems to be the slow way, I don't get why but creating and deleting a new drill object for each hole is faster.

Also using target.modifiers.new is faster than bpy.ops.object.modifier_add.

def drillIt(target, x, y, d):
    '''Drill a hole at x,y with d diameter - using a boolean modifier'''
    # this should get similar result as subtract()
    # for some reason this runs faster

    bpy.ops.mesh.primitive_cylinder_add(vertices=8, radius=d/2, depth=50,
                location=(x, y, 0))
    drill = bpy.context.object

    # Add a modifier
    mod = target.modifiers.new('Boolean',type='BOOLEAN')
    mod.object = drill
    mod.operation = 'DIFFERENCE'
    target.select = True
    bpy.context.scene.objects.active = target
    bpy.ops.object.modifier_apply(apply_as='DATA', modifier=mod.name)
    bpy.context.scene.objects.unlink(drill)


Remove the use of bit and instead of -

bit.location=[x, y, 0]
subtract(pcb, bit)


use -

drillIt(pcb, x, y, drillWidth)