pyscripter 689 Posted February 4, 2022 (edited) Please see these earlier posts on SynEdit history: SynEdit preferred version? - Delphi Third-Party - Delphi-PRAXiS [en] (delphipraxis.net) Turbo SynEdit & Font Ligatures - VCL - Delphi-PRAXiS [en] (delphipraxis.net) DirectWrite and Unicode support One of the major flaws of SynEdit was the poor handling of Unicode. A major update has been committed to the TurboPack fork, that employs DirectWrite for text painting and fixes Unicode support. SynEdit should now be on a par with, if not better than, the best editors around with respect to Unicode handling. For example: Chinese is properly spaced and surrogate pairs and color emojis are fully supported: Bidirectional text editing is fully supported as well: WordWrap has been re-written and is now based on DirectWrite as well. This last update also includes other enhancements as for example an option to alpha blend the selection, another option for selection to cover just selected text instead of full lines, as in VS code and other editors, and horizontal mouse wheel scrolling: Other recent improvements: The undo/redo system was buggy and a mess, getting in the way of implementing new features. I has been reimplemented from scratch. The gutter has been reimplemented from scratch and is now flexible and extensible. A track changes bar like in Visual Studio has been added and unlike Delphi's it saves and restores line state correctly on undo/redo. The code base has been refactored cleaned-up, and partially documented, yet, and despite of the new features, it is thousands of lines shorter than the original. But a lot more can be done in this area. See here for the full list of enhancements in the the TurboPack fork. Backward compatibility Turbopack Synedit remains compatible with earlier versions of Synedit, but you do need to reinstall Synedit, load forms that use SynEdit ignoring error messages and save them again for the new properties to take effect. The use of DirectWrite though means that Windows XP is no longer supported. The TurboPack SynEdit fork supports Delphi versions Berlin or later. Future plans The next big planned feature is multi-selection and multi-cursor editing. Support the project Most of the bugs remaining in the issue tracker are C++Builder related. Also, the C++ packages have not been updated yet. We are actively seeking contributions on the C++Builder side of things (package updates, bug fixes). Of course you can also support the project by submitting bug reports and pull requests. Or, by implementing new features (e.g. minimap, Sync Edit like in Delphi, Delphi or VS-code like templates etc.) Note: Many thanks to @MarkShark for his great contributions to the SynEdit project. Edited February 4, 2022 by pyscripter 13 9 Share this post Link to post
Bob Devine 11 Posted February 4, 2022 Does the code re-factoring make an FMX port more achievable or is that still out of scope? Share this post Link to post
pyscripter 689 Posted February 4, 2022 (edited) 17 minutes ago, Bob Devine said: Does the code re-factoring make an FMX port more achievable or is that still out of scope? I suppose it does a bit. FMX is using DirectWrite on Windows, and its graphics engine matches the constructs of DirectX (FMX.Canvas.D2D). One would have to create a VCL abstraction of DirectX that it is similar (possibly identical) to that of FMX. It could be based on Vcl's Direct2DCanvas. That would be useful in porting not just SynEdit but other components from Vcl to FMX and the opposite. Edited February 4, 2022 by pyscripter 3 Share this post Link to post
Darian Miller 361 Posted February 5, 2022 Wow, very nice! Much appreciated! Share this post Link to post
dados 5 Posted February 9, 2022 (edited) Thank you. Nice to get more features and development I just updated from a source since sept.2021 and here is what I did after upgrading: New project and a new synedit aligned to client. Loaded some text (plsql code), about 5000 lines Run project And the first thing I do is scroll up and down (page up/down and with mouse dragging vertical scrollbar) ......and the scrolling is lagging/studdering I turned off IndentGuides and it's a little bit better but still lags. I created the same project using the earlier version I used before and there is no lag Noticed also that cpu usage is much higher when scrolling (IndentGuides off) with the new version This is a major turn off for me and for this reason I will revert to the earlier version. SynEdit has always been so fast and smooth and that has been, for me, one of the it's best feature I've been using SynEdit, since at least, from 2004 and it's nice it's still being updated but please do not make it slow Is this something anyone else has experienced? Edited February 9, 2022 by dados Share this post Link to post
pyscripter 689 Posted February 9, 2022 17 hours ago, dados said: nd the first thing I do is scroll up and down (page up/down and with mouse dragging vertical scrollbar) ......and the scrolling is lagging/studdering This is not the experience here and in the other testers. Performance with highlighted 10000s of lines is very good. Could you please submit an issue at the Issue Tracker with sample project and text file? Share this post Link to post
Stefan Glienke 2002 Posted February 10, 2022 Could be DirectWrite related if you have a rather poor onboard GPU. Check CPU and GPU usage when it's lagging. Share this post Link to post
pyscripter 689 Posted February 10, 2022 (edited) 1 hour ago, Stefan Glienke said: Could be DirectWrite related if you have a rather poor onboard GPU. Check CPU and GPU usage when it's lagging. This is correct, but this is the reason GPU support is disabled by default: D2D1RenderTargetProperties( {$IFDEF GPUSupport} D2D1_RENDER_TARGET_TYPE_DEFAULT, {$ELSE} D2D1_RENDER_TARGET_TYPE_SOFTWARE, // much faster in my desktop with a slow GPU {$ENDIF} As far as CPU utilization goes, I have tried with a 10K lines pascal file with highlighting, code folding and indentation lines. Scrolling by pressing continuously the Page Down key results in CPU utiliization around 5% (I7 12700). With GPUSupport enabled (currently incompatible with Gutter.ShowLineNumbers - will be fixed), CPU utilization remains close to 0% but GPU utilization rises to 5% (Intel UHD 770). Edited February 10, 2022 by pyscripter Share this post Link to post
MarkShark 27 Posted February 10, 2022 I'm using the new SynEdit with the SQL Highlighter. I've tested with a 250,000 line sql script containing a real mix of statements including comments, string literals, lots of brackets, etc. I don't see any lag or stuttering. Make sure to test outside of debug mode as that really seems to affect the dwrite stuff. My machine isn't a high end machine, it's an AMD mini pc with a mobile 4-core (Ryzen 7 3750H), Windows 11, Delphi 11. I can't say enough about the new features of the SynEdit, the new gutter stuff, the alpha blended select and especially the new way it does the end of row selections is really nice. Pyscripter has done an amazing job modernizing the control. It will be interesting to get feedback on what cpu/gpu people are using and if there are particular settings that seem to affect performance. 1 Share this post Link to post
dados 5 Posted February 13, 2022 On 2/10/2022 at 3:30 AM, MarkShark said: Make sure to test outside of debug mode as that really seems to affect the dwrite stuff. I'm sorry, insufficient testing on my part. It seems that running SynEdit in debug mode has a huge affect on performance. Running a release is still fast 🙂 Thank you. Ps. I'm running a Dell Precision laptop with i7-6820HQ + Intel HD 530 + NVIDIA Quatro M1000M 1 1 Share this post Link to post
dados 5 Posted February 15, 2022 More on performance. I loaded a 120 Mb. 3.3million line xml file and that is just blistering. Then I loaded a 10 Mb. xml file with no line brakes (single line) and it's extremely slow. Is this something that could be optimized? (large single line file) Compiled and tested in 32 and 64 bit debug and release. Share this post Link to post
irawan 2 Posted February 22, 2022 On 2/15/2022 at 4:59 PM, dados said: More on performance. I loaded a 120 Mb. 3.3million line xml file and that is just blistering. Then I loaded a 10 Mb. xml file with no line brakes (single line) and it's extremely slow. Is this something that could be optimized? (large single line file) Compiled and tested in 32 and 64 bit debug and release. formatting such a huge line is huge job. Share this post Link to post
dados 5 Posted February 23, 2022 Well pyscripter rolled up his sleeves and has made the latest version the fastest one ever. Loading a 10Mb xml file with a a single line or a 120Mb with 3.3 million lines is now amazingly fast, even with highlighting. Thank you @pyscripter for your great work 2 1 Share this post Link to post
MarkShark 27 Posted February 23, 2022 @pyscripter went above and beyond with these improvements! Share this post Link to post
pyscripter 689 Posted February 28, 2022 A new feature has been added: Scintilla like indicators. 3 Share this post Link to post
pyscripter 689 Posted March 16, 2022 (edited) A new Word-like spell checking has been added to SynEdit. Edited March 16, 2022 by pyscripter 5 2 Share this post Link to post
Stéphane Wierzbicki 45 Posted March 16, 2022 5 hours ago, pyscripter said: A new Word-like spell checking has been added to SynEdit. You are on Steroids 🙂 ... New features every week 🥳. Thanks 👍 Share this post Link to post
dsimun 0 Posted March 27, 2022 I have problem with the new version (downloaded yesterday). Application Error: Exception EReadError in module SE_html.exe at 000B5920. Error reading SynEdit.SelectedColor.Alpha: Property Alpha does not exist. I'm using RAD Studio 11 on Windows 10. Any idea what's wrong? Share this post Link to post
MarkShark 27 Posted March 27, 2022 (edited) It sounds like it's a component streaming property error. Make sure to open each form that has a SynEdit on it in the Delphi IDE and then save the form. That should fix any of those types of errors. Another thought is to make sure you have the latest version and to build and install the packages. Edited March 27, 2022 by MarkShark Share this post Link to post
dsimun 0 Posted March 27, 2022 Unfortunately, it doesn't work. I made a brand new VCL application, just one form, I just dropped TSynEdit on it and tried to compile. The same error occurs. The latest version of SynEdit was installed using GetIt the day before yesterday and is marked 2022.03. I will try to uninstall now and reinstall. By the way, on the same computer I have Delphi version 10.4.2 with an earlier version of SynEdit installed that works properly. Share this post Link to post
pyscripter 689 Posted March 28, 2022 11 hours ago, dsimun said: The latest version of SynEdit was installed using GetIt Getit has not been updated. To use the latest version use the Github repo instead. Share this post Link to post
dummzeuch 1505 Posted March 28, 2022 3 hours ago, pyscripter said: Getit has not been updated. To use the latest version use the Github repo instead. Who is resposible for updating SynEdit in Getit? Embarcadero? Share this post Link to post
pyscripter 689 Posted March 28, 2022 4 minutes ago, dummzeuch said: Who is resposible for updating SynEdit in Getit? Embarcadero? Yes. Share this post Link to post
dummzeuch 1505 Posted March 28, 2022 1 hour ago, pyscripter said: 1 hour ago, dummzeuch said: Who is resposible for updating SynEdit in Getit? Embarcadero? Yes. 😢 Share this post Link to post
Mike Torrettinni 198 Posted July 21, 2022 On 2/13/2022 at 8:34 AM, dados said: It seems that running SynEdit in debug mode has a huge affect on performance. Running a release is still fast 🙂 Thank for pointing this out! I was looking into why so sluggish on my text files (108 MB file size, 1Mio lines), but in release mode is still pretty fast. 🙂 Share this post Link to post