Page MenuHomePhabricator

Memory issues with ArticleInfo
Closed, ResolvedPublic5 Estimated Story Points

Description

Apparently we're hitting the peak, somehow!

The best test is [[George W. Bush]] which is the mainspace page with the most number of revisions on enwiki:
http://xtools.wmflabs.org/articleinfo/en.wikipedia.org/George%20W.%20Bush

On prod you get a blank page, and on staging you'll get an actual error. This is reproducible on my local by first clearing the cache then trying to load the article.

Using looping through with fetch rather than grabbing all data with fetchAll appears to do the trick. This involves a lot of reworking of ArticleInfo and the Page and PageRepository classes.

Event Timeline

Relevant commit, specially, see the changes to ArticleInfoController: https://github.com/x-tools/xtools-rebirth/commit/2d8d7f2a54b14bac9fdc6ddca949e04b91ddb061

This probably isn't a 5, but certainly a 3. I wanted to move more stuff out of ArticleInfo into some repository and write some tests, but we literally have to comb through the article revision by revision. It's hard to devise a way to break out parseHistory() into multiple, testable functions. So I've instead just improved the comments, and made it use more of things Edit offers.

Anyway, this seems to do the trick. [[George H. Bush]] loads successfully: http://xtools.wmflabs.org/articleinfo/en.wikipedia.org/George%20W.%20Bush

I also fixed several other unnoticed bugs and a few regressions. I'm going to continue to try to clean it up even more, and hopefully get better test coverage.

kaldari subscribed.

Haven't been able to reproduce the problem, so it seems to be fixed.