RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Removing unused features

    Scheduled Pinned Locked Moved Ideas and Development
    emulationstatiooptimization
    40 Posts 13 Posters 8.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ?
      A Former User
      last edited by

      Removing features is a bad idea period. I can't imagine any single feature is leading to code bloat and removing a feature is the slipperiest of slopes.

      That's my two cents.

      HexH cyperghostC 2 Replies Last reply Reply Quote 0
      • HexH
        Hex @A Former User
        last edited by

        @LiveFastCyYoung said in Removing unused features:

        Removing features is a bad idea period. I can't imagine any single feature is leading to code bloat and removing a feature is the slipperiest of slopes.

        That's my two cents.

        I am also of the same opinion but there comes a time when things start getting too extensive.

        Based on these comments

        1. Random game in menu can be removed as it is duplicated by a key binding.
        2. No feature can be removed
        3. Code must be simplified/optimized somehow (reworked).

        Sent from 20,000 leagues under the sea.

        Powersaver Emulation station : https://github.com/hex007/EmulationStation
        ES dev script : https://github.com/hex007/es-dev/blob/master/es-tests.sh

        pjftP 1 Reply Last reply Reply Quote 0
        • cyperghostC
          cyperghost @A Former User
          last edited by cyperghost

          @LiveFastCyYoung @TMNTturtlguy
          This is just a thread we discuss what is possible and what not.
          It's worth to think about. What will really happen nobody knows - but there is need to maintain code.

          1 Reply Last reply Reply Quote 0
          • Z
            Zigurana
            last edited by

            The trigger for this was mostly the ever increasing amount of RAM neede to compile ES.
            Part of this is due to increased code complexity. Another part is due to CLOAD (coding-like-on-a-desktop), while the raspberry-pi cannot deliver the same amount of 'umph' as our big boys.
            For example we've recently included another boost library, to enable regexp. We are also rather free with the include scope, and sparse with forward declarations when possible. I feels there is quite a lot to be optimized in that regard, before we even need to start thinking about removing functionality.

            Further splitting up the code base into core, app, scraper/MD editor, might help a bit, not sure how much.

            Still think we should clean up the menus, and remove the "surprise me" entry, because it's a leftover from a bygone era (before the introduction of the hotkey).

            If tetris has thought me anything, it's that errors pile up and that accomplishments dissappear.

            1 Reply Last reply Reply Quote 4
            • lostlessL
              lostless @mediamogul
              last edited by

              @mediamogul Just a FYI, On the new 2.4.0 now only randomizes the system you are in. So if you're in NES and hit X, it will randomly select an NES game. The surprise me works like the old random. I guess now you can go to "All games" and then randomize it.

              Z cyperghostC mediamogulM 3 Replies Last reply Reply Quote 0
              • Z
                Zigurana @lostless
                last edited by

                @lostless indeed

                If tetris has thought me anything, it's that errors pile up and that accomplishments dissappear.

                1 Reply Last reply Reply Quote 0
                • HexH
                  Hex
                  last edited by

                  @Zigurana Can yo elaborate why regex was included?

                  Sent from 20,000 leagues under the sea.

                  Powersaver Emulation station : https://github.com/hex007/EmulationStation
                  ES dev script : https://github.com/hex007/es-dev/blob/master/es-tests.sh

                  Z 1 Reply Last reply Reply Quote 0
                  • cyperghostC
                    cyperghost @lostless
                    last edited by cyperghost

                    @lostless That's a good case.
                    The old system made random of full gamelist which - you explained - is still available. But I have 2500 VCS (Atari 2600) games and it was really nasty to randomize and get these games as result. The better usecase is, to choose a system and then randomize the choosen-system gamelist.

                    lostlessL 1 Reply Last reply Reply Quote 0
                    • lostlessL
                      lostless @cyperghost
                      last edited by

                      @cyperghost I was just making an observation after I got 2.4.0 running and adding the new theme folders. I would sometimes just randomly close my eyes and start a random game pressing X a bunch of times only to realize it was just randomly changing the carousel. Now if i can only figure out how to make the new folders label Genesis games as "Genesis" and not mega drive. But thats a topic for another thread.

                      1 Reply Last reply Reply Quote 0
                      • Z
                        Zigurana @Hex
                        last edited by

                        @Hex Apologies, I mis-remembered.
                        It was boost-string that is now used when parsing comma separated strings in filter expressions, I believe.
                        In any case, that was not really the point. I think it is possible to optimize ES quite a bit more, if we are really going to make this tuned to the pi. You've shown this already with the power saving you were able to realize!

                        If tetris has thought me anything, it's that errors pile up and that accomplishments dissappear.

                        1 Reply Last reply Reply Quote 0
                        • mediamogulM
                          mediamogul Global Moderator @lostless
                          last edited by mediamogul

                          @lostless

                          @mediamogul Just a FYI, On the new 2.4.0 now only randomizes the system you are in. So if you're in NES and hit X, it will randomly select an NES game. The surprise me works like the old random. I guess now you can go to "All games" and then randomize it.

                          I noticed that last night. IMO It's a huge improvement in functionality and I spent well over six hours trying random games, both globally and system-based. Very, very keen and much appreciated.

                          RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                          1 Reply Last reply Reply Quote 1
                          • pjftP
                            pjft @Hex
                            last edited by

                            @Hex said in Removing unused features:

                            @LiveFastCyYoung said in Removing unused features:

                            Removing features is a bad idea period. I can't imagine any single feature is leading to code bloat and removing a feature is the slipperiest of slopes.

                            That's my two cents.

                            I am also of the same opinion but there comes a time when things start getting too extensive.

                            Based on these comments

                            1. Random game in menu can be removed as it is duplicated by a key binding.
                            2. No feature can be removed
                            3. Code must be simplified/optimized somehow (reworked).

                            Until we have proper analytics in place, I cannot vote for removing anything. We had similar conversations in the past, recently. For any case we can think that we have a workaround as advanced users, several others will suffer. Scraping and Editing Metadata on the Pi is needed because not everyone has SSH access, and not everyone can read a SD card with a EXT4 file system on their computers, for instance.

                            While there are a few things I can certainly suggest from my lack of use that could be removed, it wouldn't be representative, to be honest.

                            There are a few minor things that can be done here and there, but the cosmetic things mostly boil down to better UX rather than a significant reduction in code complexity - for better and for worse.

                            As far as code health goes, there certainly are several improvements that can be done - quite a few refactoring work going on between @Hex, @Zigurana, and @jdrassa 's work, which will certainly yield good results in the long run.

                            I mean, things that could be removed off the top of my head would be:

                            • The "Surprise Me" button (I'm sorry I left it there in my last change on the Random behavior, but it's mostly a UX thing)
                            • The "MAME name mapper" is questionable, but I'm sure some users still benefit from it. Code complexity is likely minimal.
                            • Refactoring/simplifying the GUIs and Views may yield some interesting results, but I have no evidence of that.

                            All in all, though, as @BuZz mentions, RetroPie provides builds for the users. If it's a problem for testers, we can provide builds ourselves if needed.

                            It's not that it wouldn't potentially be helpful, but I wouldn't support removing features blindly. Refactoring or simplifying code, I'm all for that.

                            Ultimately, if we think about it, this is mostly a pain for us - the developers. I don't think we should have things made necessarily "simpler" for us at the expense of the end user. We should aim to strike a balance, and hopefully maximize both.

                            My 2 cents! Thanks for bringing it up :)

                            1 Reply Last reply Reply Quote 2
                            • HexH
                              Hex
                              last edited by

                              @pjft said in Removing unused features:

                              Refactoring or simplifying code, I'm all for that.

                              Yes I agree. This topic was made to determine where we can compromise and if not what else can be done. To conclude simplifying the code is the only solution apparently.

                              Sent from 20,000 leagues under the sea.

                              Powersaver Emulation station : https://github.com/hex007/EmulationStation
                              ES dev script : https://github.com/hex007/es-dev/blob/master/es-tests.sh

                              pjftP 1 Reply Last reply Reply Quote 0
                              • pjftP
                                pjft @Hex
                                last edited by

                                @Hex said in Removing unused features:

                                To conclude simplifying the code is the only solution apparently.

                                Not necessarily the only solution, but until there's a clear need or data to justify removing features, I believe it's not the solution we would want to pursue at this stage.

                                I had thought at one point of adding analytics hooks to ES and reporting on usage patterns, options and such to a centralized server for us to be able to best determine what was used more often or not. That would inform these decisions a lot better.

                                That being said, it's probably more bloat to the code base :P

                                But hey, I'm sure by Q4 or something if I'm kind of running out of ideas, I'll implement something like that. I had thought of other interesting "connected" applications, like knowing what games are the most popular every week... but once again, not for now, if ever.

                                1 Reply Last reply Reply Quote 0
                                • HexH
                                  Hex
                                  last edited by

                                  @pjft I would very much like these kind of feature that can be toggled by user so privacy conscious people dont complain about it. I sure would bloat the code a lot. We could even separate this feature and provide hooks to ES to minimize code.

                                  Sent from 20,000 leagues under the sea.

                                  Powersaver Emulation station : https://github.com/hex007/EmulationStation
                                  ES dev script : https://github.com/hex007/es-dev/blob/master/es-tests.sh

                                  pjftP 1 Reply Last reply Reply Quote 0
                                  • pjftP
                                    pjft @Hex
                                    last edited by

                                    @Hex Oh, certainly. Anything that would report any kind of data to a server would need a previous explicit acceptance from the user, and would never be mandatory. And it would always be anonymized and aggregated as well, just for analysis.

                                    But you're right - that's a whole new can of worms I'm not especially sure I want to open. I was just using it as an example that had crossed my mind a few times in the past :)

                                    1 Reply Last reply Reply Quote 0
                                    • meleuM
                                      meleu
                                      last edited by

                                      Recently I was tweaking RetroArch code and this thread here reminded me that there are dozens of flags in RetroArch code that provide several ways to build it. For example, for a really lite RetroArch, with no XMB, no networking, no retroachievements, and many other features, you can compile it using:

                                      make HAVE_XMB=0 HAVE_MATERIALUI=0 HAVE_NUKLEAR=0 HAVE_ZARCH=0 HAVE_OVERLAY=0 HAVE_LANGEXTRA=0 HAVE_LIBRETRODB=0 HAVE_NETWORKING=0 HAVE_NETLOGGER=0 HAVE_CHEEVOS=0 HAVE_NETWORKGAMEPAD=0 HAVE_MINIUPNPC=0 WANT_IFADDRS=0 HAVE_SOCKET_LEGACY=0
                                      

                                      Maybe this can be done on ES code too. One example, people who use RetroPie on devices powered by a battery probably won't use video preview. So adding a way to compile ES with no video preview should be useful for that use case.

                                      Now, the obligatory joke: this is how I feel in my RetroArch code adventure:

                                      0_1499681342000_retroarch_code.png

                                      • Useful topics
                                      • joystick-selection tool
                                      • rpie-art tool
                                      • achievements I made
                                      Z 1 Reply Last reply Reply Quote 4
                                      • Z
                                        Zigurana @meleu
                                        last edited by

                                        @meleu I've felt the same way about ES for a long time. Maybe I understand it better now, but maybe I've just gotten used to it <shudder>.

                                        If tetris has thought me anything, it's that errors pile up and that accomplishments dissappear.

                                        1 Reply Last reply Reply Quote 2
                                        • HexH
                                          Hex
                                          last edited by

                                          @meleu @Zigurana Are we setting up builds to work with flags first? Does using said flags reduce compile time?

                                          Sent from 20,000 leagues under the sea.

                                          Powersaver Emulation station : https://github.com/hex007/EmulationStation
                                          ES dev script : https://github.com/hex007/es-dev/blob/master/es-tests.sh

                                          Z 1 Reply Last reply Reply Quote 0
                                          • Z
                                            Zigurana @Hex
                                            last edited by

                                            @hex
                                            I don't know.
                                            Do you mean using general compiler options to change the optimizations done during compilation? Or do you want to introduce new flags to enable /disable specific files to be included in the first place?

                                            In either case, without a better (data-driven!) understanding of what the current bottlenecks are, this is not likely going to be the solution to our problem.

                                            If tetris has thought me anything, it's that errors pile up and that accomplishments dissappear.

                                            meleuM 1 Reply Last reply Reply Quote 1
                                            • First post
                                              Last post

                                            Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                            Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.