mylanconnolly
Explore posts from serversEncountering poor performance in production after a number of troubleshooting steps
Hello all, I nearly have an MVP set up for my application but I think the performance of it is going to be an issue. Each page in the application takes roughly 1.5 seconds to load, with the vast majority of that time being server response time (roundtrips to and from the server and SSL negotiation are around 100ms). I have configured Clockwork on my server and when I have it enabled to see where the bottlenecks lay, it shows roughly 100ms in database queries and the rest as "controller". If I try to enable xdebug to try and get more details it doesn't work so I have skipped that for now.
A few notes on my setup:
- My app is hosted using php-fpm (version 8.3.9). My web server is Caddy.
- My database is on another server in the same region, but database time seems to be relatively low.
- I have enabled opcache, and it seems to be working.
- When deploying the app, the following commands are run in order:
I saw that a lot of permission checks are performed so I tried to make those faster. I think it's important to note that this is not on pages that have a ton of records on them. Generally, I'm testing on pages with an empty table. I'm relatively new to PHP and since Filament is such a large codebase I'm trying to find my way around to determine how best to improve the performance but I'm a bit stuck. Any pointers would be greatly appreciated!
8 replies
Can we modify the dd tag that contains custom infolist entries?
Hello all,
I was working on creating a custom infolist entry for my app (basically a scrollable
pre
tag for fixed-width text. After playing around with my component for a while I determined I can't get it to work correctly without modifying the dd
tag that encloses my custom list entry component. Is there a way to do this? I see the emitted HTML has an empty class
attribute but I couldn't figure out how to modify that in the docs. I'd appreciate any assistance. Thanks!4 replies
AEAsh Elixir
•Created by mylanconnolly on 8/15/2023 in #support
Ash JSON API is showing an error when following tutorial
Hello, after taking a break from Phoenix and Ash, I decided to move forward with my side project. When setting up the
ash_json_api
extension, I got the following error:
I added it to my Phoenix router like so:
I am using Phoenix 1.7.7 and Elixir 1.15.4. Is this a known thing or did Phoenix maybe change some internals? Thanks!4 replies
AEAsh Elixir
•Created by mylanconnolly on 4/16/2023 in #support
Issue using datetime_add
Hello, thanks again for the awesome library, I was trying to get into some more useful functionalities of Ash (calculations, etc.) and I'm mostly having a good time learning about it but there was one bit that I was having a hard time with. I was modeling an appointment, which I wanted to store the start date and the duration of. I thought calculating the end time would be useful, so I added made the following resource:
If I attempt to load the calculation, I get an error:
This is the SQL that is generated:
If I tweak it to include parentheses around the timestamp calculation, it works:
Is there something I'm doing incorrectly in defining the calculation?
Thanks!
6 replies
AEAsh Elixir
•Created by mylanconnolly on 3/15/2023 in #support
Using manage_relationship with nested relationships
I have three resource modules:
With this in place, I was able to figure out how to insert patients into the
database pretty easily, however my problems arose when trying to do the exams.
The exams are loaded from an outside data source where we derive the event series
based on a date value. So what I tried to do was:
When doing this, an error is returned saying that the event series is invalid
because the patient relationship is not defined. Is it possible to do this with
a call to
manage_relationship
or am I fundamentally missing something?
Thanks so much for any assistance, Ash is very cool so far!22 replies