'Apply all extra filters on a list of record ids
@param ids: the pre-filtered set of record IDs
@param limit: the maximum number of matching IDs to establish,
None to find all matching IDs
@return: a sequence of matching IDs'

def apply_extra_filters(self, ids, start=None, limit=None):

    resource = self.resource
    efilters = self.efilters
    methods = self.extra_filter_methods
    filters = []
    append = filters.append
    for (method, expression) in efilters:
        if callable(method):
            append((method, expression))
        else:
            method = methods.get(method)
            if method:
                append((method, expression))
            else:
                current.log.warning(('Unknown    filter    method:    %s' % method))
    if (not filters):
        return ids
    self.efilters = []
    subset = set()
    tail = ids
    limit_ = limit
    while tail:
        if limit:
            (head, tail) = (tail[:limit_], tail[limit_:])
        else:
            (head, tail) = (tail, None)
        match = head
        for (method, expression) in filters:
            match = method(resource, match, expression)
            if (not match):
                break
        if match:
            subset |= set(match)
        found = len(subset)
        if limit:
            if (found < limit):
                limit_ = (limit - found)
            else:
                tail = None
    subset = [item for item in ids if (item in subset)]
    if start:
        subset = subset[start:]
    self.efilters = efilters
    return subset
