run :profile start filename, then :profile func * Then do the slow thing, and close vim. This will write your profile data to filename.