1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Lack of Interest [minor] Use array_unique() in XenForo_Model_Import::getImportContentMap()

Discussion in 'Closed Suggestions' started by Mike Tougeron, Nov 16, 2011.

  1. Mike Tougeron

    Mike Tougeron Well-Known Member

    When importing extremely large datasets, the query created in XenForo_Model_Import::getImportContentMap() can get very large and run out of memory. This method doesn't check to see if the $ids is an array with only unique values so the IN statement could include 1000s of values when only a few 100 are needed.

    Line 311
    $ids = array_unique($ids);

    I know this is a minor thing and won't happen that often for most people but I thought I'd throw it out there since it caused me some minor headaches. :)

    Thanks, Mike
     

Share This Page