Luigi Rizzo wrote:
The following uncommented code in res_features.c::ast_park_call()
is extremely expensive because it has O(N*M) cost, where N is the
size of the parking lot, and M is the number of parked calls:

        for (i = 0; i < parking_range; i++) {
                x = (i + parking_offset) % parking_range + parking_start;
                for (cur = parkinglot; cur; cur = cur->next)
                        if (cur->parkingnum == x)
                                break;
                if (!cur) /* extension x is free, take it */
                        break;
        }

Luigi,
Please check out my multiparking branch and let's try some new approach within that code. I'll happily accept patches to that, since that changes parking and might as well fix this issue as well.

/O
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Dev mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to