When this function occurs my program slows down dramatically for a few seconds
I need in detail the fastest way to save and load this data please.
saveLocalData(UserID..UniqueID..ChapterID.."Photos", #Album)
print("saving")
for i,v in pairs(Album) do
if v.edit == false then do return end end
j = "Documents:PhotoImage"..tostring(i)..UserID..UniqueID..ChapterID
saveLocalData(UserID..UniqueID..ChapterID.."PhotoX"..i, v.x)
saveLocalData(UserID..UniqueID..ChapterID.."PhotoY"..i, v.y)
saveLocalData(UserID..UniqueID..ChapterID.."PhotoW"..i, v.w)
saveLocalData(UserID..UniqueID..ChapterID.."PhotoH"..i, v.h)
saveLocalData(UserID..UniqueID..ChapterID.."PhotoMode"..i, v.mode)
saveImage(j, v.img)
v.edit = false
end