Menu

#3742 MaxNavigationItems issue

Latest_Git
wont-fix
nobody
Interface (555)
5
2013-12-01
2012-11-30
No

The default value for this is 25. I have a situation where the page navigator appears when I have plenty of space in the panel. The reason is that one of the databases uses a prefix and there are about 20 databases starting with this prefix.

Discussion

  • Supun Nakandala

    Supun Nakandala - 2013-02-20

    I am not sure what this error is. As far as I understood the image shows the error. Am I correct?

     
    • adam_china

      adam_china - 2013-04-06

      Hi, Supun,
      I would like to fix this problem. but I am quite confused about which space do you mean in the image?

      thanks

      Adam

       
  • Marc Delisle

    Marc Delisle - 2013-02-20

    Your image does not show the error. Look at mine: there is a page navigator, but plenty of space under the "servinfo" database.

     
    • adam_china

      adam_china - 2013-04-06

      Hi, Marc,
      I would like to fix this problem. but I am quite confused about which space do you mean in the image?

      Attachment is the view from my side.

      thanks

      Adam

       

      Last edit: adam_china 2013-04-06
      • adam_china

        adam_china - 2013-04-14

        and it is a setting "Maximum items in branch"

        So I don't think this is a bug. what do you think?

         
        • Marc Delisle

          Marc Delisle - 2013-04-14

          I still think that it's a bug (not a critical one, but I'm losing screen space)

           
          • adam_china

            adam_china - 2013-04-15

            or we can add a setting about MaxNavigationItems.
            Users can choose to set MaxNavigationItems by PMA automatically or do it themselves.

            what do you think?

             
            • Marc Delisle

              Marc Delisle - 2013-04-15

              There is already a setting to tune MaxNavigationItems, in user preferences (see Settings > Navigation panel > Navigation panel). But it would be better if phpMyAdmin could react by itself to optimize screen space.

               
              • adam_china

                adam_china - 2013-04-16

                I know that setting. but I was talking about different setting.

                In my last comment, I meant:
                we can add a setting about whether to use MaxNavigationItems.
                Users can choose to set MaxNavigationItems by PMA automatically or do it themselves.

                1. If user chooses to set MaxNavigationItems by PMA automatically, we can optimize screen space
                2. IF user do it themselves, it the behavior we can see today.

                If want to totally fix this problem, we should come out a solution. Can you start doing it by this design? thanks

                 
                • Rouslan Placella

                  No, that's not a good solution. Please see the email I quoted earlier for a better solution.

                   
              • adam_china

                adam_china - 2013-04-16

                sorry for the typo:

                If want to totally fix this problem, we should come out a solution. Can you start doing it by this design? thanks

                =========> should be:
                Can Istart doing it by this design? thanks

                 
              • adam_china

                adam_china - 2013-04-16

                ^_^

                Can I start doing it by this design? thanks

                 
    • adam_china

      adam_china - 2013-04-14

      HI Marc,
      I found that on your screenshot (http://sourceforge.net/p/phpmyadmin/bugs/3742/), shows that 6 databases is displayed, but the navigator >>2 is displayed.
      I think you must change the configaration:
      $cfg['MaxNavigationItems'] = 25; to 6

      otherwise, it is won't happen as your screenshot. If we want to fix this bug, we should make $cfg['MaxNavigationItems'] determined by space left.

      so I want to check with you that. should we make $cfg['MaxNavigationItems'] a variable determined by space left.

       
      • Marc Delisle

        Marc Delisle - 2013-04-14

        Adam,
        I'm not sure of what the solution should be.

         
  • Rouslan Placella

    There has been a discussion about this issue on the mailing list some time ago, you guys might find it useful, so here we go:

    Le 2012-11-10 07:44, Rouslan Placella a écrit :

    On 11/10/2012 11:35 AM, Marc Delisle wrote:

    Le 2012-11-09 13:20, Rouslan Placella a écrit :

    On 11/09/2012 05:30 PM, Marc Delisle wrote:

    Marc Delisle a écrit :

    Rouslan Placella a écrit :

    On 11/09/2012 12:42 PM, Marc Delisle wrote:

    Hi Rouslan,

    The default value for MaxNavigationItems is 25. I have a situation where the page
    navigator appears when I have plenty of space in the panel. The reason
    is that one of the databases uses a prefix and there are about 20
    databases starting with this prefix.

    So, it might be difficult to understand why MaxDbList is set to 100 and
    I don't see 100 databases on page 1.
    Hi Marc,

    The limit applies to how many items are fetched from MySQL before being
    grouped and rendered, hence the issue.

    Anyway, what if you had 1000 dbs in a group? Here, in order to be able
    to show the next group (or next db), we would have to fetch all 1000 dbs
    from the first group. The implementation of grouping at the moment is
    not particularly fast, so in situations like this I would expect the
    navigation to grind down to a halt.

    Hi Rouslan,
    I tried "100" in MaxNavigationItems and saw no delay; did you have a
    reason to put "25" in its default value?

    I mean, apart from how many non-grouped dbs would be displayed?

    I'm not too sure what you are asking here...

    Anyway, I chose 25 because it fits into an average screen without the
    scrollbar, which takes up horizontal space.

    That said, I think that I have an idea. How about a larger limit on the
    number of databases to be loaded into memory and a smaller limit on the
    number of databases to be rendered and sent back to the client? We
    could, say, load 250 dbs in to memory, group them and then render and
    display the first 25 dbs/groups.

    Sounds good?

    Yes. So, MaxDbList (default 25) would be used for the rendering, and
    something like MaxNavigationDbLoaded would contain 250? And no more
    MaxNavigationItems? (I find that "items" here is unclear).

    MaxDbList is for server_databases.php. While MaxNavigationItems applies
    to all items that can be displayed in the navigation (tables, views,
    events, triggers, etc), default 25. And perhaps
    MaxNavigationItemsInMemory which would then default to 250.
    MaxNavigationItemsInMemory would then apply to how many items which can
    be grouped (dbs and tables) would be loaded into memory.

    Makes sense?

     
    • adam_china

      adam_china - 2013-04-09

      thanks for the information. I am preparing the patch. thanks

      Adam

       
    • adam_china

      adam_china - 2013-04-09

      thanks for the information. I am preparing the patch. thanks

       
  • Marc Delisle

    Marc Delisle - 2013-12-01
    • status: open --> wont-fix