Raised This Month: $18 Target: $400
 4% 

[TUT] Compiling AMXX plugins with Sublime Text


Post New Thread Reply   
 
Thread Tools Display Modes
Celena Luna
Senior Member
Join Date: Aug 2013
Location: Okinawa, Japan
Old 06-17-2020 , 13:57   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #201

PHP Code:
Exception in thread Thread-2:
Traceback (most recent call last):
  
File "./python3.3/threading.py"line 901in _bootstrap_inner
  File 
"C:\Users\SKon1\AppData\Roaming\Sublime Text 3\Packages\AmxxEditor\AmxxEditor.py"line 1016in run
    self
.process(file_nameview_buffer)
  
File "C:\Users\SKon1\AppData\Roaming\Sublime Text 3\Packages\AmxxEditor\AmxxEditor.py"line 1027in process
    self
.load_from_file(view_file_name, include, current_nodecurrent_nodebase_includes)
  
File "C:\Users\SKon1\AppData\Roaming\Sublime Text 3\Packages\AmxxEditor\AmxxEditor.py"line 1057in load_from_file
    
(file_nameexists) = get_file_name(view_file_namebase_file_name)
  
File "C:\Users\SKon1\AppData\Roaming\Sublime Text 3\Packages\AmxxEditor\AmxxEditor.py"line 1100in get_file_name
    
return (file_namepath_exists)
UnboundLocalErrorlocal variable 'file_name' referenced before assignment 
And about Profile
PHP Code:
This list shows how much time each plugin has taken to respond to each event:

on_activated:
    Default.
pane0.001s totalmean0.000smax0.001s

on_close
:
    Default.
pane0.000s total

on_deactivated
:
    Default.
history_list0.001s totalmean0.000smax0.001s

on_hover
:
    Default.
symbol0.040s totalmean0.001smax0.021s
    AmxxEditor
.AmxxEditor0.107s totalmean0.003smax0.082s

on_load
:
    Default.
detect_indentation0.036s totalmean0.018smax0.032s
    
Default.exec0.005s totalmean0.002smax0.005s

on_pre_close
:
    Default.
history_list0.001s total

on_selection_modified
:
    
AmxxEditor.AmxxEditor0.225s totalmean0.001smax0.037s 
it look normal but I got lag everytime I open a new plugin
__________________
My plugin:
Celena Luna is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 06-17-2020 , 14:29   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #202

I just launched an update fixing the `UnboundLocalError: local variable 'file_name' referenced before assignment`.

How much big is this lag when you create a new plugin? 10 seconds?

The profile results look normal. Did you run the `Profile` thing after opening a plugin? Can you try running the Profile thing again after opening several plugins? Can you PM the full Sublime Text console log after trying it?
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz is offline
Celena Luna
Senior Member
Join Date: Aug 2013
Location: Okinawa, Japan
Old 06-17-2020 , 14:54   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #203

Spoiler


The lag is 10s everytime it generate syntax summary
__________________
My plugin:
Celena Luna is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 06-17-2020 , 15:27   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #204

That `generating syntax summary` is from Sublime Text. You can try disabling it by going to the menu `Preferences -> Settings` and setting `"index_files": false`

Alternatively, you can try to limit the number for CPU's Sublime Text will use to index files by setting `"index_workers": 1` instead of completely disabling the file indexing:
Code:
    // File indexing parses all files in the side bar, and builds an index of     // their symbols. This is required for Goto Definition to work.     "index_files": true,     // Set the number threads to use for indexing. A value of 0 will make     // Sublime Text guess based on the number of cores. Use the index_files     // setting to disable all workers.     "index_workers": 0,
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 07-12-2020 , 08:18   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #205

hello. i also see some lag while opening Sublime Text Editor (but only from lately)
with doing index_files false, and index_workers: 1, i got same results...could be there any other solutions?
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...)

Last edited by JocAnis; 07-12-2020 at 08:20.
JocAnis is online now
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 07-12-2020 , 12:56   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #206

Try looking into:
  1. Setting `index_workers: 0`

  2. https://forum.sublimetext.com/t/how-to-determine-if-sublime-is-slow-vs-plugins/25618

    After completing opening Sublime Text and the lag has stopped, look into `Tools > Developer > Profile Plugins` and post here/pm the results.

  3. After completing opening Sublime Text and the lag has stopped, to go the menu `View -> Show Console` and post here/pm the results.

  4. https://forum.sublimetext.com/t/sublime-text-is-really-laggy-all-of-a-sudden/36655/

    Try setting `show_definitions: false`

How do you describe this lag? How much time does it last?
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 07-13-2020 , 08:25   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #207

Lag appears when i open sublime text editor (i have ~10 tabs/sma already opened there), it lasts 3-5sec. then if i open new .sma (i think only for smas bigger than like 500 lines) it again got stuck for 3-5 sec

edit: that lag on startup always happens after ~5sec after opening, meaning not instant lag while opening app
show consone:
Code:
DPI mode: per-monitor v2
startup, version: 3211 windows x64 channel: stable
executable: /D/Program Files/Sublime Text 3/sublime_text.exe
working dir: /D/Program Files/Sublime Text 3
packages path: /D/Program Files/Sublime Text 3/Data/Packages
state path: /D/Program Files/Sublime Text 3/Data/Local
zip path: /D/Program Files/Sublime Text 3/Packages
zip path: /D/Program Files/Sublime Text 3/Data/Installed Packages
ignored_packages: ["Vintage"]
Unable to parse color value adb7c9 at Packages/Theme - One Dark/One Dark.tmTheme:unknown
pre session restore time: 0.260836
loading dictionary Packages/Language - English/en_US.dic
startup time: 0.356836
first paint time: 0.358836
reloading plugin Default.arithmetic
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.colors
reloading plugin Default.comment
reloading plugin Default.convert_color_scheme
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.detect_indentation
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.indentation
reloading plugin Default.install_package_control
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading plugin Default.rename
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.settings
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.ui
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin ShellScript.ShellScript
reloading plugin 0_packagesmanager_loader.00-package_control
reloading plugin 0_packagesmanager_loader.10-debugtools
reloading plugin 0_packagesmanager_loader.30-channelmanager
reloading plugin AltUp.run_multiple_commands
reloading plugin AmxxChannel.commands
reloading plugin AmxxChannel.settings
reloading plugin ClearCursorsCarets.clear_cursors_carets
reloading plugin DefaultSyntax.default_syntax
reloading plugin FixedToggleFindPanel.fix_linux_selection_reset
reloading plugin FixedToggleFindPanel.fixed_focus_on_side_bar
reloading plugin FixedToggleFindPanel.fixed_paste_and_indent
reloading plugin FixedToggleFindPanel.fixed_toggle_find_panel
reloading plugin FixProjectSwitchRestartBug.fix_project_switch_restart_bug
FixProjectSwitchRestartBug Error: Could not import the MaxPane package! No module named 'MaxPane'
reloading plugin ForceRewriteSublimeSettings.force_rewrite_sublime_settings
reloading plugin MoveText.move_text
reloading plugin OverrideCommitCompletion.overwrite_commit_completion
reloading plugin OverrideUnpackedPackages.override_unpacked_packages
reloading plugin PowerCursors.power_cursors
reloading plugin RememberCommandPaletteInput.input_history
reloading plugin RememberCommandPaletteInput.view_commands
reloading plugin SideBySideSettings.sxs_settings
reloading plugin zz_packagesmanager_reenabler
reloading plugin Default.install_package_control_extended
reloading plugin Default.monkey_patch_sublime_modules
reloading plugin Default.scroll_lines
reloading plugin Default.synced_side_bar_watcher
reloading plugin Default.zz_reload_default_package
reloading plugin AmxxEditor.AmxxEditor
reloading plugin AmxxEditor.install_main_menu
reloading plugin BetterFindBuffer.find_results
reloading plugin debugtools.setup
reloading plugin PackagesManager.1_reloader
reloading plugin PackagesManager.2_bootstrap
reloading plugin PackagesManager.PackagesManager
reloading plugin ZzzReloadDefaultPackage.zz_reload_default_package
reloading plugin Default.arithmetic
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.colors
reloading plugin Default.comment
reloading plugin Default.convert_color_scheme
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.detect_indentation
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.indentation
reloading plugin Default.install_package_control
reloading plugin Default.install_package_control_extended
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.monkey_patch_sublime_modules
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading plugin Default.rename
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.scroll_lines
reloading plugin Default.settings
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.synced_side_bar_watcher
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.ui
plugins loaded
[zz_reload_default_package.py] No changes in any settings file!
PackagesManager: No updated packages
generating syntax summary
profile plugins:
Code:
This list shows how much time each plugin has taken to respond to each event:

on_activated:
    Default.pane: 0.005s total, mean: 0.001s, max: 0.005s
    Default.history_list: 0.032s total, mean: 0.005s, max: 0.030s
    FixedToggleFindPanel.fixed_toggle_find_panel: 0.034s total, mean: 0.006s, max: 0.031s
    RememberCommandPaletteInput.input_history: 0.000s total, mean: 0.000s, max: 0.000s

on_deactivated:
    Default.history_list: 0.002s total, mean: 0.000s, max: 0.002s

on_load:
    FixProjectSwitchRestartBug.fix_project_switch_restart_bug: 0.000s total
    Default.detect_indentation: 0.031s total
    Default.exec: 0.042s total

on_selection_modified:
    Default.history_list: 0.001s total, mean: 0.000s, max: 0.001s
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...)

Last edited by JocAnis; 07-13-2020 at 08:27.
JocAnis is online now
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 07-13-2020 , 13:08   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #208

You can try installing Sublime Text build 3207 (https://download.sublimetext.com/Sub...64%20Setup.exe)

To migrate, just copy your `Data` directory over the 3207 `Data` directory.

You can also try setting the AmxxEditor setting `live_refresh_delay` to 0
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:33.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode