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

Figure out why matching algorithm takes so long and find a way to optimize it #15

Open
Tarig0 opened this issue Sep 9, 2013 · 10 comments
Milestone

Comments

@Tarig0
Copy link
Member

Tarig0 commented Sep 9, 2013

Is it possible to have a matching spinner in the interface and have the container search without blocking (freezing) the client or server?

@Eurymachus
Copy link
Member

It is a strange one. We need to time the various segments of the checks.

On 9 Sep 2013, at 14:41, "Allen Cook" [email protected] wrote:

Is is possible to have a matching spinner in the interface and have the container search without blocking (freezing) the client or server?


Reply to this email directly or view it on GitHub.

@Eurymachus
Copy link
Member

I'm wondering if I's to do with your HashMap checks. But that doesnt usually take that long....

The one thing is that the 'lag' doesn't seem to happen when testing via eclipse (i.e. locally)... which leads me to believe that there is a client >> server >> client network/lag issue.

@Tarig0
Copy link
Member Author

Tarig0 commented Sep 9, 2013

I think we need to have a isremote flag set so that the checks only happen
server side. This could be why things are slow.

On Mon, Sep 9, 2013 at 10:29 AM, Greg Jones [email protected]:

I'm wondering if I's to do with your HashMap checks. But that doesnt
usually take that long....

The one thing is that the 'lag' doesn't seem to happen when testing via
eclipse (i.e. locally)... which leads me to believe that there is a client

server >> client network/lag issue.


Reply to this email directly or view it on GitHubhttps://github.com//issues/15#issuecomment-24080312
.

@Tarig0
Copy link
Member Author

Tarig0 commented Sep 9, 2013

that way even with the lag at least the client doesn't block

On Mon, Sep 9, 2013 at 10:45 AM, Allen Cook [email protected] wrote:

I think we need to have a isremote flag set so that the checks only happen
server side. This could be why things are slow.

On Mon, Sep 9, 2013 at 10:29 AM, Greg Jones [email protected]:

I'm wondering if I's to do with your HashMap checks. But that doesnt
usually take that long....

The one thing is that the 'lag' doesn't seem to happen when testing via
eclipse (i.e. locally)... which leads me to believe that there is a client

server >> client network/lag issue.


Reply to this email directly or view it on GitHubhttps://github.com//issues/15#issuecomment-24080312
.

@Eurymachus
Copy link
Member

I've found the bottleneck!

OnCraftMatrixChanged gets called about 30 times + when opening the GUI. I lol'd!!!

Sent from my iPhone 4

On 9 Sep 2013, at 15:46, "Allen Cook" [email protected] wrote:

that way even with the lag at least the client doesn't block

On Mon, Sep 9, 2013 at 10:45 AM, Allen Cook [email protected] wrote:

I think we need to have a isremote flag set so that the checks only happen
server side. This could be why things are slow.

On Mon, Sep 9, 2013 at 10:29 AM, Greg Jones [email protected]:

I'm wondering if I's to do with your HashMap checks. But that doesnt
usually take that long....

The one thing is that the 'lag' doesn't seem to happen when testing via
eclipse (i.e. locally)... which leads me to believe that there is a client

server >> client network/lag issue.


Reply to this email directly or view it on GitHubhttps://github.com//issues/15#issuecomment-24080312
.


Reply to this email directly or view it on GitHub.

@Tarig0
Copy link
Member Author

Tarig0 commented Sep 9, 2013

wow why would we do that

On Mon, Sep 9, 2013 at 12:42 PM, Greg Jones [email protected]:

I've found the bottleneck!

OnCraftMatrixChanged gets called about 30 times + when opening the GUI. I
lol'd!!!

Sent from my iPhone 4

On 9 Sep 2013, at 15:46, "Allen Cook" [email protected] wrote:

that way even with the lag at least the client doesn't block

On Mon, Sep 9, 2013 at 10:45 AM, Allen Cook [email protected] wrote:

I think we need to have a isremote flag set so that the checks only
happen
server side. This could be why things are slow.

On Mon, Sep 9, 2013 at 10:29 AM, Greg Jones [email protected]:

I'm wondering if I's to do with your HashMap checks. But that doesnt
usually take that long....

The one thing is that the 'lag' doesn't seem to happen when testing
via
eclipse (i.e. locally)... which leads me to believe that there is a
client

server >> client network/lag issue.


Reply to this email directly or view it on GitHub<
https://github.com/SlimeVoid/CollaborativeMod/issues/15#issuecomment-24080312>

.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/15#issuecomment-24093360
.

@Eurymachus
Copy link
Member

It's not on purpose. It's due to the sub calls from setSlot in InventorySubUpdate and onInventoryChanged method

Sent from my iPhone 4

On 9 Sep 2013, at 17:56, "Allen Cook" [email protected] wrote:

wow why would we do that

On Mon, Sep 9, 2013 at 12:42 PM, Greg Jones [email protected]:

I've found the bottleneck!

OnCraftMatrixChanged gets called about 30 times + when opening the GUI. I
lol'd!!!

Sent from my iPhone 4

On 9 Sep 2013, at 15:46, "Allen Cook" [email protected] wrote:

that way even with the lag at least the client doesn't block

On Mon, Sep 9, 2013 at 10:45 AM, Allen Cook [email protected] wrote:

I think we need to have a isremote flag set so that the checks only
happen
server side. This could be why things are slow.

On Mon, Sep 9, 2013 at 10:29 AM, Greg Jones [email protected]:

I'm wondering if I's to do with your HashMap checks. But that doesnt
usually take that long....

The one thing is that the 'lag' doesn't seem to happen when testing
via
eclipse (i.e. locally)... which leads me to believe that there is a
client

server >> client network/lag issue.


Reply to this email directly or view it on GitHub<
https://github.com/SlimeVoid/CollaborativeMod/issues/15#issuecomment-24080312>

.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/15#issuecomment-24093360
.


Reply to this email directly or view it on GitHub.

@Tarig0
Copy link
Member Author

Tarig0 commented Sep 9, 2013

I was assuming redpower did that as well

On Mon, Sep 9, 2013 at 1:00 PM, Greg Jones [email protected] wrote:

It's not on purpose. It's due to the sub calls from setSlot in
InventorySubUpdate and onInventoryChanged method

Sent from my iPhone 4

On 9 Sep 2013, at 17:56, "Allen Cook" [email protected] wrote:

wow why would we do that

On Mon, Sep 9, 2013 at 12:42 PM, Greg Jones [email protected]:

I've found the bottleneck!

OnCraftMatrixChanged gets called about 30 times + when opening the
GUI. I
lol'd!!!

Sent from my iPhone 4

On 9 Sep 2013, at 15:46, "Allen Cook" [email protected]
wrote:

that way even with the lag at least the client doesn't block

On Mon, Sep 9, 2013 at 10:45 AM, Allen Cook [email protected]
wrote:

I think we need to have a isremote flag set so that the checks
only
happen
server side. This could be why things are slow.

On Mon, Sep 9, 2013 at 10:29 AM, Greg Jones <
[email protected]>wrote:

I'm wondering if I's to do with your HashMap checks. But that
doesnt
usually take that long....

The one thing is that the 'lag' doesn't seem to happen when
testing
via
eclipse (i.e. locally)... which leads me to believe that there is
a
client

server >> client network/lag issue.


Reply to this email directly or view it on GitHub<

https://github.com/SlimeVoid/CollaborativeMod/issues/15#issuecomment-24080312>

.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub<
https://github.com/SlimeVoid/CollaborativeMod/issues/15#issuecomment-24093360>

.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/15#issuecomment-24095156
.

@Eurymachus
Copy link
Member

Never lagged.

I'm working it out

Hit me when you're online.

Sent from my iPhone 4

On 9 Sep 2013, at 18:19, "Allen Cook" [email protected] wrote:

I was assuming redpower did that as well

On Mon, Sep 9, 2013 at 1:00 PM, Greg Jones [email protected] wrote:

It's not on purpose. It's due to the sub calls from setSlot in
InventorySubUpdate and onInventoryChanged method

Sent from my iPhone 4

On 9 Sep 2013, at 17:56, "Allen Cook" [email protected] wrote:

wow why would we do that

On Mon, Sep 9, 2013 at 12:42 PM, Greg Jones [email protected]:

I've found the bottleneck!

OnCraftMatrixChanged gets called about 30 times + when opening the
GUI. I
lol'd!!!

Sent from my iPhone 4

On 9 Sep 2013, at 15:46, "Allen Cook" [email protected]
wrote:

that way even with the lag at least the client doesn't block

On Mon, Sep 9, 2013 at 10:45 AM, Allen Cook [email protected]
wrote:

I think we need to have a isremote flag set so that the checks
only
happen
server side. This could be why things are slow.

On Mon, Sep 9, 2013 at 10:29 AM, Greg Jones <
[email protected]>wrote:

I'm wondering if I's to do with your HashMap checks. But that
doesnt
usually take that long....

The one thing is that the 'lag' doesn't seem to happen when
testing
via
eclipse (i.e. locally)... which leads me to believe that there is
a
client

server >> client network/lag issue.


Reply to this email directly or view it on GitHub<

https://github.com/SlimeVoid/CollaborativeMod/issues/15#issuecomment-24080312>

.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub<
https://github.com/SlimeVoid/CollaborativeMod/issues/15#issuecomment-24093360>

.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/15#issuecomment-24095156
.


Reply to this email directly or view it on GitHub.

@Tarig0
Copy link
Member Author

Tarig0 commented Mar 27, 2014

hmm had an idea, could we do matching algorithm on client only and tell the server only when the inventory changes, that way it doesnt' matter how many people are using workbenches all the work is done on each client

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants