Android Question B4A 5.0 Beta: autocomplete/intellisense

Discussion in 'Android Questions' started by sorex, May 28, 2015.

  1. sorex

    sorex Expert Licensed User


    Is there a way to tweak the autocomplete/intellisense a bit so that it resets the search counter at each keypress ?

    It is too slow and when I typed a line I really have to wait for the chars to appear.

    Worst case making it optionally behave like before (ctrl + space)
  2. sorex

    sorex Expert Licensed User

    just did some quick typing again and it seems chars display one every second.
  3. Peter Simpson

    Peter Simpson Expert Licensed User

    Hello @sorex,
    Having an option to switch off the intellisense would probably be a good idea. I'm not suffering from any lag issues whatsoever when typing fast, it's running absolutely smoothly here, the intellisense is instant...
  4. sorex

    sorex Expert Licensed User

    I notice that the variable log window is also updated at every keypress, maybe that's part of the slowdown aswell.

    should be enough for me if that one is only updated during compile.
  5. Erel

    Erel Administrator Staff Member Licensed User

    The IDE was heavily tested with large code files (more than 30,000 lines each). The performance is mostly not affected by the code length.
    The main thread never blocks while something happens in the background.

    With that said, if you are running it on a slower computer (maybe with a single core) then the background tasks can slow down the main thread.
    I will try to add an option to disable some of the features.
  6. sorex

    sorex Expert Licensed User

    It's a Dell Precision M4300 laptop so it's a dual core Intel Centrino box. All other soft I use runs fast on it.

    also notice that the filter lists too many results aswell. enter "aa" on a new line and it populates that listbox with everything having 2 a's somewhere in the command (not next to each other)
  7. sorex

    sorex Expert Licensed User

    I just double checked with the new B4J IDE, it is faster in that one just like I recalled.

    maybe the keyword list to search through is shorter in the B4J IDE?
    Peter Simpson likes this.
  8. sorex

    sorex Expert Licensed User

    Thanks for beta 3, @Erel.

    It didn't solve my issue yet so I went for other tests.

    I installed the beta on my 13 year old single core 2.6GHz Dell Dimension desktop.

    The same result is to be seen there.

    Looking around on the net I see a lot of posts about slow autocomplete/intellisense in Visual Studio's so I fired up VB.NET 2010 which I have installed there.

    Surprisingly the intellisente/autocomplete is instant there and no delays at all. (Never noticed it in the Notepad2 Mod either that looks through every word in the open document for autocompletion)
  9. Erel

    Erel Administrator Staff Member Licensed User

    I don't think that such a computer is relevant for performance testing. I tried it on several moderately old computers and the performance was good.

    Anyway the next update will include an option to disable the implicit auto completion.
    Peter Simpson likes this.
  10. qsrtech

    qsrtech Active Member Licensed User

    I too find the "intellisense" lagging but maybe i'm just too fast for it ;)
  11. sorex

    sorex Expert Licensed User

    that is like avoiding the issue. if VS and other editors are not lagging on that feature at all than it means something is wrong with the current implementation.

    see for the compare with B4J which I mentioned earlier that is a lot faster.

    when I keep pressing a letter in B4A nothing appears till I release the button and wait a few more seconds till it went through all lookups or source checks.

    I still have to find another editor that has this kind of behaviour.

    My guess is that the problem is the log update (see attachment) that seems to go over the entire source on every keypress, maybe that should only be done at line change or compile?

  12. sorex

    sorex Expert Licensed User

    forgot to mention that I agree that you give priority to the compile problems that keep people stuck and I'm willing to test custom builds in advance related to this issue.
  13. Erel

    Erel Administrator Staff Member Licensed User

  14. sorex

    sorex Expert Licensed User

    ok, I opened it with that parameter.

    wrote a few dim lines and closed it again.

    the log is attached.

    Attached Files:

  15. sorex

    sorex Expert Licensed User

    I see in the log that it uses .NET 4.0, I don't think I updated to the .net that was in your first post. Will do that now but it didn't gain any speed in the designer when I did that on the other machine.
  16. sorex

    sorex Expert Licensed User

    the installer reported that I already had that .NET 4.0 installed. (it's an XP and the other an Windows 7 box)
  17. Erel

    Erel Administrator Staff Member Licensed User

    Please try it again when beta #4 is released with the option to disable the automatic auto completion.
    Peter Simpson likes this.
  18. sorex

    sorex Expert Licensed User

    is it possible to split it up in

    [x] Enable Autocomplete
    [x] Enable log updates while typing


    if the 2nd is the cause I can still benefit the autocomplete.

  19. Erel

    Erel Administrator Staff Member Licensed User

    As I previously wrote the UI thread is never blocked because of background tasks. It is possible that building the auto completion list (which must happen on the ui thread) slows down the typing.

    Disabling the warnings will not affect the performance.
  20. sorex

    sorex Expert Licensed User

    well you always have a theoratical and the practical side of a programming story :)

    If you don't try you never know for sure.

    the slowdown is there on my machines and different OSs so it's not a single case.

    I'll see if I can track something on those machines.
    Peter Simpson likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice