Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE] OPL is taking a lot of time to boot using USB #300

Closed
hardlevel opened this issue Jul 24, 2020 · 10 comments · Fixed by #342
Closed

[ISSUE] OPL is taking a lot of time to boot using USB #300

hardlevel opened this issue Jul 24, 2020 · 10 comments · Fixed by #342
Assignees
Labels

Comments

@hardlevel
Copy link

Disclaimer
Using the beta, since 1486, alredy saw the issues

Describe the issue
Since the beta 1486 OPL is taking a lot of time to load when using usb, the flashdrive is defragmented, do you know this problem? A lot of people is complaining about it

Configuration (please complete the following information):

  • Console Model: [e.g. SCPH-77006] - tested in a 39001 but the problem may happen in any ps2
  • Open PS2 Loader revision: [e.g. OPNPS2LD-c5ed52e6, OPL v0.9.3] - since beta 1486
  • Open PS2 Loader mode: [e.g. USB, SMB, HDD] - it happens with usb
  • Information about affected games (if any): link to redump.org or game serial: [e.g. http://redump.org/disc/561 or SLES-52798] - the problem is on the boot of opl, may take minutos to load

To Reproduce
Steps to reproduce the behavior:
1 . insert some games in a usb flashdrive or hdd
2. try to boot opl with the usb drive inserted

Expected behavior
it will take at least 2 minutes to load

@hardlevel hardlevel added the bug label Jul 24, 2020
@rickgaiser
Copy link
Member

Can you be more specific about the version, not only the version number but also the git hash (like c5ed52e in the example)
1 - The last version that did work
2 - The first version that no longer works

@hardlevel
Copy link
Author

sorry, I don't know how to find in commits, but the problme happened after this commits

rev1750 - Daniel Sousa - More changes - Mon May 11 21:26:08 2020 +0100
rev1749 - Daniel Sousa - Changes for NEWLIB - Mon May 11 20:00:29 2020 +0100
rev1711 - Maximus32 - Simplify timeout in guiConfirmVideoMode - Thu May 7 21:58:21 2020 +0200
rev1710 - Maximus32 - Notification duration implemented wrong. This fix works but it's a hack. - Thu May 7 21:58:21 2020 +0200
rev1709 - Rick Gaiser - Fix FPS counter (newlib port required) - Thu May 7 21:58:21 2020 +0200
rev1708 - Rick Gaiser - Always reload theme when changing video modes - Thu May 7 21:58:21 2020 +0200
rev1707 - Maximus32 - Fix freeing texture clut - Thu May 7 21:58:21 2020 +0200
rev1706 - Maximus32 - Fix closing file when jpg too large - Thu May 7 21:58:21 2020 +0200
rev1705 - belek666 - Cleaner code - Sat May 2 20:36:01 2020 +0200
rev1704 - belek666 - Disables PS2 controller when using pademu - Sat May 2 13:15:24 2020 +0200
rev1703 - Maximus32 - Make compatible with newlib - Sat Apr 25 19:30:03 2020 +0200

@rickgaiser
Copy link
Member

That's mostly my name by those commits. I'll try to replicate, and hopefully fix, the issue.

@rickgaiser
Copy link
Member

I cannot replicate the issue:

In settings if I set all start modes to "Manual" and the default menu to "USB Games":

  • OPL boots fast with a USB stick inserted
  • in the "USB Games" menu if I press "x", the loading icon shows for a around 10 seconds, then shows my 7 games from the stick.

In settings if I set USB start mode to "Auto" and the default menu to "USB Games":

  • OPL boots 10 seconds slower with a USB stick inserted
  • in the "USB Games" it shows my 7 games from the stick immediately.

I'm not sure if this was always the case. But the USB games are now loaded during the splash screen. If you have many many games on there (I have 7), then maybe it takes 2 minutes to load?

Questions:
Can you download the latest OPL (hash cf02bc7) from here:
https://github.com/ps2homebrew/Open-PS2-Loader/suites/952808675/artifacts/11902750
Can you check the "auto"/"manual" setting if that makes a difference?
Can you check a usb stick with no games?

@J013k
Copy link
Contributor

J013k commented Jul 26, 2020

  1. I cannot reproduce this issue on 1541, but from what I remember first time OPL will mount any USB device it will check if it has got all folders:
    ART
    CFG
    CD...
    If any of folder do not exists it will create one.
    This procedure can takes some time, but it should be only noticeable only once.

  2. Second thing that comes to my head is to check from where setting were loaded.
    Notification needs to enabled to see at least "CNF was loaded from mass:/".

  3. Third...

  • Old method to name games:
    SCUS_974.81.God of War II.iso
  • New method:
    God of War II.iso
  1. How many games you have on your USB device?

@J013k
Copy link
Contributor

J013k commented Jul 27, 2020

Out of curiosity I have try OPL 1442...
Game list from USB with Device start mode: AUTO
loads almost immediately.

While in OPL 1541 it takes noticeable more time to initialize (~10 s).
It is still far away from 2 minutes, but I have only 15 games on that USB Device.

I'm using old method to name games (SLXX_XXX.XX.Game.iso).

I will try to edit this post and add few other tests with different rev.

EDIT: I think this problem starts after 1443:
https://www.psx-place.com/threads/open-ps2-loader-v0-9-3.13415/page-48#post-240445.

Later I have a problem with exiting from app:
https://www.psx-place.com/threads/open-ps2-loader-v0-9-3.13415/page-48#post-240537.

So probably somewhere between these builds:
rev1450 - Rick Gaiser - Fix FPS counter (newlib port required)
rev1449 - Rick Gaiser - Always reload theme when changing video modes
rev1448 - Maximus32 - Fix freeing texture clut
rev1447 - Maximus32 - Fix closing file when jpg too large
rev1446 - belek666 - Cleaner code
rev1445 - belek666 - Disables PS2 controller when using pademu
rev1444 - Maximus32 - Make compatible with newlib
rev1443 - Jolek - Languages update. (#253)
rev1442 - Tobias Jakobi - Increase read delay cycles for Kingdom Hearts II (#248)
rev1441 - ElPatas1 - Merge pull request #243 from uyjulian/fixesfornewtoolchain
rev1440 - uyjulian - Inline assembler compatibility with new toolchain
rev1439 - uyjulian - Fix memcpy linking error with new toolchain
rev1438 - uyjulian - Remove unnecessary inline specifier from functions
rev1437 - ElPatas1 - Merge pull request #239 from Tupakaveli/master
rev1436 - Tupakaveli - font: fix scaling in auto video mode
rev1435 - Tupakaveli - theme adjustments
rev1434 - Tupakaveli - add belek666 & jolek to about page, code clean ups
rev1433 - KrahJohlito - validate png size with actual psm
rev1432 - KrahJohlito - themes: translate info page attribute text keys

@rickgaiser
Copy link
Member

stat(fullpath, &st);

This instruction seems to take the longest time to complete. It's used for requesting the filesize only. Perhaps requesting the file size can be delayed to the time when a game is selected? Then only requesting the size for that single game, instead of requesting it for all games.

@rickgaiser
Copy link
Member

rickgaiser commented Dec 24, 2020

@J013k can you check if this build solves this issue?
https://github.com/rickgaiser/Open-PS2-Loader/runs/1606775146

It's not a real fix but a workaround, I've disabled the 'stat' function, so the filesize is no longer available.

EDIT: It's a gcc10 build, but for this issue that should make no difference.

@J013k
Copy link
Contributor

J013k commented Dec 25, 2020

I downloaded OPL 1575 (583dfe0) from here:
https://github.com/rickgaiser/Open-PS2-Loader/actions/runs/443118800.

After some I notice that I need to be log in to download anything...
Anyway both links have the same md5sum for ELF:`b2266b8719a6e23e463c18b0caf0538e...

@rickgaiser with this workaround games list is taking significantly less time to boot when a USB device is inserted.
I also deleted games.bin from CD and DVD folder.
A full boot without these files took ~31 sec.
With them ~15 sec.

In OPL 1442 a full boot without games.bin took ~30 sec.
While with them ~12 sec.

From I remember some time ago additional MC checks were added for the memory cards,
so improvements defensively were made.
Thanks.

Additionally in this build GSM and IGR do not work as they should,
but these problems have been reported recently.

Tupakaveli added a commit that referenced this issue Jan 1, 2021
Improve debugging, fix #339 and workaround #300
@rickgaiser
Copy link
Member

@hardlevel can you confirm this issue is fixed in the latest release and close this issue?

@rickgaiser rickgaiser linked a pull request Jan 3, 2021 that will close this issue
@rickgaiser rickgaiser self-assigned this Jan 3, 2021
AKuHAK pushed a commit that referenced this issue Sep 30, 2021
Improve debugging, fix #339 and workaround #300
citronalco pushed a commit to citronalco/OPL-Daily-Builds that referenced this issue Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants