Announcement

Collapse
No announcement yet.

A new IDE for PowerBASIC with enhanced project and debugging features

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • JK,
    Toshiba
    Satellite L555
    Intel(R) Core(TM) 2 Duo CPU T6600 @ 2.20GHz 2.20GHz
    4.00 GB Memory
    Windows 10
    64-bit

    Code:
    '_________________________________________________________________
    '
    ' Main procedure
    '_________________________________________________________________
    
    Behavior starts here
    FUNCTION WndProc (BYVAL hWnd AS LONG, BYVAL wMsg AS LONG, _
    BYVAL wParam AS LONG, BYVAL lParam AS LONG) EXPORT AS LONG
    
    FUNCTION = DefWindowProc(hWnd, wMsg, wParam, lParam)
    
    END FUNCTION
    Behavior ends here
    My Project is around 130,000 physical lines or 451,000 with all the called code added in.

    My primary program file is the only place I notice the sluggish behavior. That file is around 33,081 lines.
    The WndProc procedure is 32,192 lines of that file

    I don't even have to highlight text to see the cursor movement change speed at the edge of the WndProc
    code. Scrolling the caret up or down inside the WndProc is 10 times slower than scrolling outside it.


    I renamed WndProc to WndProc_1. Did not change the behavior.

    Yes, I can send it to you.
    Last edited by Jim Fritts; 18 Mar 2017, 11:12 PM.

    Comment


    • Hi Jim,


      yes, i would be interested to see it.

      Technically there is a limit of 65535 lines per file in JK-IDE. The IDE does a lot of things for you in the background and the more lines the more work per keystroke is necessary (and the slower it gets) - therefore an upper limit. From a practical point of view, i wouldn´t have a code file with more than 10000 lines. I always split bigger projects into a number of code files - that´s what projects are for. And with it´s many navigation features (procedure jump, jump history, find, codefinder, code tree, etc.) is easy to find and to jump between code sections.

      So if you split your primary file into smaller logical pieces, what you describe should go away. I would like to see your code anyway - maybe there is something else i missed.


      JK

      Comment


      • Hmm JK...
        Each one of my code files is set to my personal limit of no more than 35,000 lines. I have 6 code files in my project. The only one of those that exhibits the described behavior is my primary file. Maybe I can turn off some of the many built-in navigation features (procedure jump, jump history, find, codefinder, code tree, etc.) and see if it changes the errant behavior. Any suggestions? Thanks

        Comment


        • JK,
          This is what I have checked on Editor Options column 1:
          Use Tabs
          Spaces for a Tab
          Auto Indentation
          Syntax Highlighting
          CR+LF line endings (Paste)
          Editor PB style

          I tried turning off Syntax Highlighting but noticed no change in behavior.

          Considering moving WndProc to it's own file.
          Last edited by Jim Fritts; 19 Mar 2017, 10:26 AM.

          Comment


          • JK,
            Created a code file for WndProc.

            As I was moving the code in code blocks I was testing the source file for changes in cursor speed. Once 22,000 lines were moved the source file cursor began speeding up. However, the cursor movement in the new WndProc file began slowing to a crawl as I dropped in the first chunk. How weird!

            Another oddity,
            I was using Save after pasting each chunk but noticed the save was not happening unless I clicked off the IDE and then back on it.

            Comment


            • Hi Jim,


              i need your code, i don´t want to spy, what you coding, and i´m not going to make use of it in any kind, i swear. But the only way to find out, what is going on here is to test it on my computer and see what happens - and maybe why. (jk-ide at t minus online dot de, you find this address also in the help file "Issues and bugs")


              JK

              Comment


              • JK,
                Thank you. I will send it by the end of the day. I'm just trying everything I can think of to help solve/isolate this issue. Currently WndProc has been split in 2 pieces. All the %WM_COMMAND messages are now being handled in a SUB. So WndProc is now only 11,000 lines.
                Funny thing.
                I have several lines of blank space between the 2 routines. When the cursor passes through that area it goes into high speed then slows back down when going into the next code section.
                Thanks for your patience.

                Comment


                • JK,
                  New issue. While migrating %WM_COMMAND to a subroutine I had to Replace several hundred items and remove several hundred items.
                  When I tried to use Find and Replace to replace this: FUNCTION = 1 and put nothing in it's place an error message popped up stating "You must specify replacement text!"

                  So I ended up using
                  App Button, Delete
                  App Button, Delete
                  App Button, Delete
                  App Button, Delete
                  App Button, Delete
                  .
                  .
                  .
                  App Button, Delete
                  Last edited by Jim Fritts; 19 Mar 2017, 04:14 PM.

                  Comment


                  • Hey Jim,

                    one single space as a replacement text would have saved you some work ...

                    JK

                    Comment


                    • JK,
                      You should have the file now. MyF00.bas

                      Look for this section

                      END FUNCTION 'end WndProc
                      ' slow cursor
                      'fast cursor
                      'fast cursor
                      'fast cursor
                      'fast cursor
                      'fast cursor
                      'fast cursor
                      'fast cursor
                      ' slow cursor
                      sub ChooseCommand(BYVAL wParamX AS LONG, BYVAL lParamX AS LONG)

                      Comment


                      • Jim,

                        your post was at 10:21 PM (local time for me), now it´s 10:43 PM - no mail...
                        Please try again, maybe rename the attachment as ".123", some mail providers don´t like ".bas", ".zip" or the like - are you sure you got the e-mail address right ?

                        JK

                        Comment


                        • JK,
                          Yes, I just checked an I received a failure delivery message because the servers considered it spam or laden with a virus.
                          Will try again...

                          Ok should be there now. MyF00.txt

                          Last edited by Jim Fritts; 19 Mar 2017, 06:02 PM.

                          Comment


                          • Jim, i finally received it - thanks.

                            Comment


                            • Jim,


                              i can see the effect you described, it migth take some time to investigate why this happens. For me the (slow) speed it still acceptable but the difference is noticable. Thanks for reporting the problem and sending the code!

                              As a remedy when marking text - you may not only use the UP/DOWN ARROW keys, PGUP/PGDN work as well and a lot faster.


                              JK

                              Comment


                              • JK,
                                Ah Good. Perhaps my computer is a bit slower than yours so the effect is more pronounced. Yes, I use all the methods you describe. Funny thing. What originally drew me to the cursor effect was the slowness in responsiveness in general for the WndProc procedure compared to all the other sections of my program.

                                Slow reaction to single click, double click, ENTER key, highlighting, cursor movement, etc. Initially I just assumed it was normal because of high performance under the hood. So I didn't pay attention to it.
                                Now it seems the effect is very specific.

                                I'd have to say the good news is that turning the WM_COMMAND into a subroutine has in effect accelerated my program.
                                Very Cool!
                                Last edited by Jim Fritts; 19 Mar 2017, 06:59 PM.

                                Comment



                                • Hi Juergen

                                  I'm still having trouble with the backup folder path.

                                  My Directory structure
                                  PbProjectName
                                  PbProjectName\Backup

                                  PbProjectName contains the source files
                                  PbProjectName\Backup is for the backup

                                  Each project has a different path but the same structure

                                  I have in the options "PB Project Backup Path" the following .\Backup

                                  All the backup files still go in the PbProjectName folder.rather than PbProjectName\Backup

                                  Cheers Michael

                                  Comment


                                  • @Jim

                                    i know the problem now. It´s the sheer size of the two procedures (> 5000 lines per procedure), every time the cursor moves, the current procedure is scanned for several things, the larger the procedure the more time consuming it is - i will have to make this scan faster.


                                    @Michael

                                    ok, i see your problem. Currently the logic is as follows: a backup of a single file ALWAYS goes as ".bak" into the same folder as the original file. The "PB Project Backup Path" applies only for a full backup of a WHOLE project when doing a "Compile for Release (Backup)". If "PB Project Backup Path" is not given (empty), a backup folder named "Backup" is created as subfolder of the project´s folder and used as a default.

                                    So you want every backup operation for a SINGLE file to go into a subfolder of your project - right ? Well, i could add an option for specifying a subfolder of each project´s folder, where these backup files should go to as an alternative to the current behavior.


                                    JK

                                    Comment


                                    • Hi Juergen,

                                      Yes a single file .bak into a subfolder of the project. An option to do this would be awesome. It will keep the source folder clean leaving it containing only the working set of files.

                                      Cheers Michael

                                      Comment


                                      • Hi all,


                                        V 1.9.1.0 is online, the IDE works faster now, even with very large files, there is a new option for single file backup in projects, please read about it in the help file: Editor\Options Dialogs\Path Options Dialog, fixed a few minor issues. Partially really complicated stuff - i hope making the IDE faster didn´t introduce new problems.


                                        @Michael,

                                        i hope this meets your needs.


                                        @Jim,

                                        i already noticed that the IDE is getting slower for large files, but i thought it was the overall load. Your post brought this to my attention again and i realized, that the delay is mostly due to a core function getting slower the larger the code file is. Changing the design in order to reduce the number of necessary calls wasn´t satisfying enough. So i decided to rewrite this core function as a specialized assembler function and now it is about a hundred times faster, which is enough even for very large files.

                                        Thanks for pointing this out, it helped, as i see it, fixing a former weakness of the IDE.


                                        JK




                                        Comment


                                        • "@Michael,

                                          i hope this meets your needs."

                                          Brilliant Juergen, Yes it does, source folder now contains just working files and the backups go to the sub folder.

                                          Many thanks
                                          Michael

                                          Comment

                                          Working...
                                          X