I'm using a Sharepoint list to keep track of items that users have favorited, mapping user aliases to item IDs. I have two options, and I'm wondering which is more efficient. One makes for less total items in the list, but the other takes less processing per operation- I'm wondering if either of these considerations are negligible in terms of SharePoint.

Option 1:

Create a new item with one user alias and one ID number every time an item is favorited, removing it when un-favorited.

Option 2:

Check if an item with the user's alias exists. If it does not, create a new item with the alias and the item's ID. If it does, append the item ID after the previous IDs associated with the user's alias. When removing a favorite, that particular ID needs to be located in the list of IDs and removed.

  • 1. I think you meant to flip the wording in your option 2... If an item with the user's alias exists, append, and if it doesn't, create a new item. 2. With the first option you would probably run up against the 5,000 list item soft cap in SharePoint much faster, unless your number of users and/or items to favorite isn't that significant. If you do go with option 2, consider reordering the items in sequence each team you append/delete to make it faster to cycle through. – Brendan W Oct 16 '17 at 20:16
  • wording fixed as per your note (good catch). I wasn't aware of the 5,000 item cap— it will likely not come even close to that mark, but I may go with option 2 just in case. Thank you! – jaxuru Oct 16 '17 at 22:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.