XF 1.5 Speeding up user cache rebuilds

llk

Member
I'm working on importing data from another forum platform to XF. One part of the process that is currently very slow is rebuilding user caches. It appears to be CPU-bound on the machine running the rebuild (as opposed to being bottlenecked by the database), so I would like to know if there are any tips for speeding up this operation aside from getting a faster CPU.

For example, can cache rebuilds be parallelized? Can I skip part or all of the rebuild process by having my import script do some of the work as it's importing the users in the first place? What exactly is being rebuilt, anyway?
 
It rebuilds and checks quite a variety of data. There isn't a way to speed it up unless you want to do a whole custom system for it.

Generally speaking though, you should be able to get away with doing these rebuilds at the end of the import, potentially even while the form is active.
 
It rebuilds and checks quite a variety of data. There isn't a way to speed it up unless you want to do a whole custom system for it.
I've essentially already done that: I've written a completely custom importer in Java, which is working well in my testing.

So perhaps I can take away some work from the cache-rebuilding process by improving my importer-- I could easily comment out parts of the XF user cache rebuilder that my importer is already doing. Do you know what part of the user cache rebuild process is generally the most time-consuming? Permissions stuff, maybe?
 
I'm not 100% sure the most time consuming element. It may be the alert/conversation recalculation. You could comment out various bits of the tool if you feel confident that you have the correct values in place though.
 
Back
Top Bottom