Sublime Forum

ST3: Auto-suggest hanging for a time at high CPU

#1

I’m editing a PHP project, and when I add parameters for methods named init_answer_providers_for_post( $post ) or get_answer_provider_for_post( $post ) Sublime Text climbs to near 100% of the CPU and beachballs for several minutes once I type “$p” or “_p”. I’ve tried quitting the app, trashing the Library/Application Support/Sublime Text 3/Cache dir, but the problem recurs reliably. When the app settles down again, the auto-suggest menu briefly appears and then closes. (It’s a WordPress project, so “post” is a common word, in case that helps.)

If I type the text in a comment, then cut and paste into position the hang doesn’t occur. I’ve not noticed it hanging in this way in other situations.

Build 3015.

0 Likes

#2

I’ve now had this issue with the following code, in another WordPress project. The hang started just after I typed “$s”. Is there any way I can set some debugging on the suggest dialog to get more information?

/**
 * Hooks the WP media_view_settings filter 
 *
 * @return void
 **/
function swme_media_view_settings( $settings ) {
	
	return $settings;
}
add_filter( 'media_view_settings', 'swme_media_view_settings', 10, 2 );
0 Likes

#3

Thanks for the report, will fix for the next build

0 Likes