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

Employee Checkin is taking too long time to be saved #609

Closed
1 task done
mubi64 opened this issue Jun 20, 2023 · 4 comments
Closed
1 task done

Employee Checkin is taking too long time to be saved #609

mubi64 opened this issue Jun 20, 2023 · 4 comments

Comments

@mubi64
Copy link

mubi64 commented Jun 20, 2023

Information about bug

Employee Checkin is taking too much time to be saved for my client, client’s employees are around 6000 and Employee Checkin records are almost 1200000, this line is taking around 7 seconds to execute in employee_checkin.py file

def validate(self):
        validate_active_employee(self.employee)
        self.validate_duplicate_log()
        self.fetch_shift()

self.validate_duplicate_log() this function is taking much time. Is there any solution for this.

Thanks

Module

HR

Version

Frappe Version: v14.26.0 (version-14)
ERPNext Version: v14.10.0 (version-14)
Frappe HR Version: v14.2.2 (version-14)

Installation method

None

Relevant log output / Stack trace / Full Error Message.

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@mubi64 mubi64 added the bug Something isn't working label Jun 20, 2023
@ruchamahabal
Copy link
Member

@mubi64 Can't replicate. The query is fairly simple. So it shouldn't take much time. Something else might be a bottleneck. Can you upgrade HR to the latest instance and check? It's on 14.2.2 and the latest release is v14.4.3.

Many optimizations have gone in for the attendance flow.

@ruchamahabal ruchamahabal added performance and removed bug Something isn't working labels Jun 20, 2023
@mubi64
Copy link
Author

mubi64 commented Jun 20, 2023

@ruchamahabal You are right, query is fairly simple and it is executing instantly on a small set of records, but as I mentioned my Employee Checkin records are almost 1200,000 so maybe it is taking due to large amount of data?

@ruchamahabal
Copy link
Member

@mubi64 update to the latest release and check
Search index was added on the employee field in Employee Checkin doctype in v14.3.2

#517

@mubi64
Copy link
Author

mubi64 commented Jun 20, 2023

Thanks @ruchamahabal for instant help. It is resolved after updating to latest version.

@mubi64 mubi64 closed this as completed Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants