Bug 405187 - Solver for Freecell is very slow
Summary: Solver for Freecell is very slow
Status: RESOLVED FIXED
Alias: None
Product: kpat
Classification: Applications
Component: solver (show other bugs)
Version: 3.6
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
: 406094 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-03-07 18:02 UTC by Jonathan Ryshpan
Modified: 2019-04-01 21:24 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
attachment-21059-0.html (1.17 KB, text/html)
2019-03-10 19:23 UTC, coz
Details
Screenshot of kpat locking up the system (217.45 KB, image/png)
2019-03-11 08:50 UTC, Jonathan Ryshpan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Ryshpan 2019-03-07 18:02:28 UTC
SUMMARY
Solver for Freecell is very slow

STEPS TO REPRODUCE
1. Start Freecell
2. Make sure that Settings->Enable Solver is on
3. Play a game

OBSERVED RESULT
Game freezes for several seconds (up to 30) after some moves.

EXPECTED RESULT
Game available after no more than 1 second.

SOFTWARE/OS VERSIONS
Running under Fedora-29
KDE Frameworks 5.55.0
Qt 5.11.3 (built against 5.11.3)
The xcb windowing system

ADDITIONAL INFORMATION
Bug appears to be new in version 3.6
Problem observed on game number 1206106340
Comment 1 coz 2019-03-08 17:59:33 UTC
Hello, Actually, after the last update on Fedora 29, the "solver" doesn't work at all for some of the games. I have to hit  "Demo" for the game to auto drop the already solved game.
Comment 2 Jonathan Ryshpan 2019-03-09 08:04:23 UTC
Even without the solver being active (Settings->Enable Solver unset) Freecell is extremely slow.
Comment 3 Shlomi Fish 2019-03-10 12:06:41 UTC
(In reply to Jonathan Ryshpan from comment #0)
> SUMMARY
> Solver for Freecell is very slow
> 
> STEPS TO REPRODUCE
> 1. Start Freecell
> 2. Make sure that Settings->Enable Solver is on
> 3. Play a game
> 
> OBSERVED RESULT
> Game freezes for several seconds (up to 30) after some moves.
> 
> EXPECTED RESULT
> Game available after no more than 1 second.
> 
> SOFTWARE/OS VERSIONS
> Running under Fedora-29
> KDE Frameworks 5.55.0
> Qt 5.11.3 (built against 5.11.3)
> The xcb windowing system
> 
> ADDITIONAL INFORMATION
> Bug appears to be new in version 3.6
> Problem observed on game number 1206106340

Seems to work fine here on fedora 30 on an old acer aspire 5738DZG X64 laptop with xfce and 3 GB of RAM. What are your system's hardware specs? Can you use a system monitor?
Comment 4 Shlomi Fish 2019-03-10 14:50:49 UTC
It is fine in a fedora 29 x86-64 vm with 2 gb of RAM and jwm as well.
Comment 5 Dan Ciarniello 2019-03-10 17:45:47 UTC
I have run into the same problem.

Card motion is often stuttery and cards that could be automatically moved to the solved pile are not.  

This is definitely not a memory issue as I have 32G of RAM.

It is definitely a regression in kpat between 18.04.3 and 18.12.2.

On a fully up to date Fedora 29 system 18.04.3 works fine.  18.12.2 does not.
Comment 6 coz 2019-03-10 19:23:38 UTC
Created attachment 118697 [details]
attachment-21059-0.html

No it's not, I hve fedora 29 with 16 gigs of ram and the solver is still
"selective, particularly for "simple simon" game. It seems to work for most
of the other games I ply, however I don't play all of them.
In order to solve "simple simon" after actually solving it, I have to press
"Demo" button for it to complete.

On Sun, Mar 10, 2019 at 10:50 AM Shlomi Fish <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=405187
>
> --- Comment #4 from Shlomi Fish <shlomif@shlomifish.org> ---
> It is fine in a fedora 29 x86-64 vm with 2 gb of RAM and jwm as well.
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
Comment 7 Jonathan Ryshpan 2019-03-10 20:05:19 UTC
(In reply to Shlomi Fish from comment #3)
> (In reply to Jonathan Ryshpan from comment #0)
> > SUMMARY
> > Solver for Freecell is very slow
> 
> Seems to work fine here on fedora 30 on an old acer aspire 5738DZG X64
> laptop with xfce and 3 GB of RAM. What are your system's hardware specs? Can
> you use a system monitor?

Hardware
Processors: 4S Intel Core I5 CPU at 3.20 GHz
Memory: 15.5 GiB of RAM

I could use a system monitor; which one do you recommend?
Comment 8 Shlomi Fish 2019-03-10 20:26:50 UTC
(In reply to Jonathan Ryshpan from comment #7)
> (In reply to Shlomi Fish from comment #3)
> > (In reply to Jonathan Ryshpan from comment #0)
> > > SUMMARY
> > > Solver for Freecell is very slow
> > 
> > Seems to work fine here on fedora 30 on an old acer aspire 5738DZG X64
> > laptop with xfce and 3 GB of RAM. What are your system's hardware specs? Can
> > you use a system monitor?
> 
> Hardware
> Processors: 4S Intel Core I5 CPU at 3.20 GHz
> Memory: 15.5 GiB of RAM
> 
> I could use a system monitor; which one do you recommend?

I like https://en.wikipedia.org/wiki/Htop but there are many other decent ones.
Comment 9 Shlomi Fish 2019-03-11 01:10:30 UTC
Hi all!

I was able to see the problem esp with deal 830910836. See https://phabricator.kde.org/D19671 for a tentative fix.
Comment 10 Jonathan Ryshpan 2019-03-11 07:12:08 UTC
(In reply to Shlomi Fish from comment #9)
> Hi all!
> 
> I was able to see the problem esp with deal 830910836. See
> https://phabricator.kde.org/D19671 for a tentative fix.

(In reply to Shlomi Fish from comment #8)
> (In reply to Jonathan Ryshpan from comment #7)
> > (In reply to Shlomi Fish from comment #3)
> > > (In reply to Jonathan Ryshpan from comment #0)
> > > > SUMMARY
> > > > Solver for Freecell is very slow
> > > 
> > > Seems to work fine here on fedora 30 on an old acer aspire 5738DZG X64
> > > laptop with xfce and 3 GB of RAM. What are your system's hardware specs? Can
> > > you use a system monitor?
> > 
> > Hardware
> > Processors: 4 Intel Core I5 CPU at 3.20 GHz
> > Memory: 15.5 GiB of RAM
> > 
> > I could use a system monitor; which one do you recommend?
> 
> I like https://en.wikipedia.org/wiki/Htop but there are many other decent ones.
I tried ksysguard, but didn't see anything worth reporting.
Comment 11 Jonathan Ryshpan 2019-03-11 08:50:14 UTC
Created attachment 118708 [details]
Screenshot of kpat locking up the system

Shows CPU and memory activity while kpat is locking up my system
Comment 12 Jonathan Ryshpan 2019-03-11 09:01:39 UTC
(In reply to Jonathan Ryshpan from comment #10)
> (In reply to Shlomi Fish from comment #9)
> > Hi all!
> > 
> > I was able to see the problem esp with deal 830910836. See
> > https://phabricator.kde.org/D19671 for a tentative fix.
> 
> (In reply to Shlomi Fish from comment #8)
> > (In reply to Jonathan Ryshpan from comment #7)
> > > (In reply to Shlomi Fish from comment #3)
> > > > (In reply to Jonathan Ryshpan from comment #0)
> > > > > SUMMARY
> > > > > Solver for Freecell is very slow
> > > > 
> > > > Seems to work fine here on fedora 30 on an old acer aspire 5738DZG X64
> > > > laptop with xfce and 3 GB of RAM. What are your system's hardware specs? Can
> > > > you use a system monitor?
> > > 
> > > Hardware
> > > Processors: 4 Intel Core I5 CPU at 3.20 GHz
> > > Memory: 15.5 GiB of RAM
> > > 
> > > I could use a system monitor; which one do you recommend?
> > 
> > I like https://en.wikipedia.org/wiki/Htop but there are many other decent ones.
> I tried ksysguard, but didn't see anything worth reporting.

I tried ksysguard again and saw something interesting.  I started kpat.  (Unfortunately the game number is lost.  The solver was disabled.  After playing for a little while, the system became unusably slow; judging from disk activity it sounded like a swapping fit.  However, I was able to get a screen shot, which is attached as comment 11.  The system continued to be very slow even after I terminated kpat, and also some other big programs that had been running, namely chrome, firefox, and evolution.  I was able to save the screen shot, but had to reboot before it was convenient to file this report.
Comment 13 Clifford Snow 2019-03-11 18:47:52 UTC
I don't know if this will help, but some games in work just fine. For me, the following games work without problem, spider, grandfather's clock, and yukon. 

These two cause slow downs and may need force quitting - Freecell and klondike.
Comment 14 Shlomi Fish 2019-03-11 19:16:57 UTC
(In reply to Clifford Snow from comment #13)
> I don't know if this will help, but some games in work just fine. For me,
> the following games work without problem, spider, grandfather's clock, and
> yukon. 

None of these use libfreecell-solver (see https://fc-solve.shlomifish.org/ ).

> 
> These two cause slow downs and may need force quitting - Freecell and
> klondike.

Please try using freecell after building with my patch to kpat. klondike does not use fc-solve either.
Comment 15 Albert Astals Cid 2019-03-31 22:20:02 UTC
*** Bug 406094 has been marked as a duplicate of this bug. ***
Comment 16 Albert Astals Cid 2019-03-31 22:21:14 UTC
I'm closing this as it at least there's some proposed improvements for KDE applications 19.04 for frecell.

Please reopen the bug if you can still reproduce once you update to KDE Applications 19.04

If you have issues with other games, please open different bugs, makes it easier to track.
Comment 17 Jonathan Ryshpan 2019-04-01 01:36:15 UTC
Pardon my ignorance, but how can I tell whether "KDE Applications 19.04" has been installed in Fedora Linux?  Do you mean kpat-19.04?  Or maybe something else.
A search using $ rpm -qa '*kde*' 
doesn't produce any packages with promising looking names.
Comment 18 Albert Astals Cid 2019-04-01 20:24:55 UTC
KDE Applications 19.04 has not been release yet, we're in beta phase at this point.
Comment 19 Jonathan Ryshpan 2019-04-01 20:52:30 UTC
(In reply to Albert Astals Cid from comment #18)
> KDE Applications 19.04 has not been release yet, we're in beta phase at this
> point.

Can you tell me how to check when KDE Applications 19.04 has become incorporated into Fedora?  Or should I ask the Fedora people how to make the check?
Comment 20 Albert Astals Cid 2019-04-01 21:24:45 UTC
You should really ask someone from fedora about that.