Overview: Link

Patch attached that forces locale module inserts to generate sequence IDs using the sequence table rather than the auto_increment feature..

Thanks
Karthik.

CommentFileSizeAuthor
locale_16.patch1.49 KBZen

Comments

Zen’s picture

Status: Active » Needs review
killes@www.drop.org’s picture

Did you actually try this patch with an uploaded PO file of some size? I don't think LOCKing and UNLOCKing the sequnces table several hundred times for one page load is a good idea (and I am speaking from experience). We already got problems with the PO upload, no reason to make it worse.

Zen’s picture

Hi :)

No I haven't sorry. Can you point me to a suitable .po file for testing?

Off the cuff, perhaps a decent workaround would be to validate the input strings first and then call db_next_id (which can be modified to accept an optional "step" parameter) to update the sequence table by x, and then performing the INSERTs? That makes sense to me, and only one LOCK/UNLOCK needs to be performed.

Thanks for replying :)
Karthik.

killes@www.drop.org’s picture

There are tons of PO files on the translations download page. Take Afrikaans for example it is rather complete. We could introduce such a proposed step parameter, yes, but I am really not sure if consistency is worth the trouble. I am generally open for suggestions on improvements for the PO upload process, it currently uses too much RAM and could probably be faster.

killes@www.drop.org’s picture

Status: Needs review » Closed (won't fix)

marking this as won't fix.