Alexey-T / CudaText

Cross-platform text editor, written in Free Pascal
Mozilla Public License 2.0
2.4k stars 168 forks source link

small typing speed difference in main editor and in modal dialog editor #5108

Closed veksha closed 1 year ago

veksha commented 1 year ago

noticed small typing speed difference in main editor and in modal dialog editor:

https://github.com/Alexey-T/CudaText/assets/275333/cd687563-af4a-4158-85f0-8a457ef100ce

Alexey-T commented 1 year ago

Codeium


        idc=dlg_proc(h, DLG_CTL_ADD, 'editor');
        dlg_proc(h, DLG_CTL_PROP_SET, index=idc, prop={
            'name': 'memo',
            'align': ALIGN_CLIENT,
            'font_size': font_size,
            'on_key_down': cls.on_key_down,
        })

i guess on_key_down handler slows it.

veksha commented 1 year ago

no, in other dialogs too. like Option Editor Lite. and on clean Cuda.

Alexey-T commented 1 year ago

OptionsEditorLite also has on_key_down handler!

Alexey-T commented 1 year ago

and it has 'keypreview': True,

Alexey-T commented 1 year ago

on_key_down makes python -> pascal callbacks. it is slower. (keypreview: True --- too)

veksha commented 1 year ago

ok. i see.