Comments (7)
Hey @hari!
Thank you for the kind words, I really appreciate it! 😄
The performance issues for larger apps is something that seems to be popping up quite a lot, so I feel like this is something I'm definitely going to have to look at.
In all honesty, when I first made this package, I didn't expect that anyone was going to use it. I definitely didn't expect it to be used in larger apps with 1k+/10k+/100k+ short URLs haha! So there are some decisions I made when building it that didn't really think too much about performance because it wasn't really on my mind at the time.
Case-sensitivity is something that I'd never considered and I think that'll explain a lot of other people's issues too! I'd definitely be open to a PR for that!
With regards to the using max()
, can you see this causing any issues at all? I think I like the idea of switching over to this, but I'm just trying to think if it'd cause any problems for existing apps using the package? Either way, I think I'd be open to a PR for this 😄
In the near future, I'm intending on using an interface for the key generator class too. I'll be making this part of the package configurable so that you can swap out for your own implementation to generate the keys if the package's default implementation doesn't fit your apps use case anymore. I'm hoping this will make things a lot more flexible 🙂
from short-url.
Sweet! I'm in the process of getting my new book released (release date is 3rd October), so I doubt I'll be able to look at the PRs before that date, so there's no rush to make them 🙂
from short-url.
Thank you for the response @ash-jc-allen. Switching to max()
shouldn't cause any issues as it is just making a native SQL call.
I will submit 2 PRs this week.
from short-url.
I was wondering how the migration should be added for this change. I read your comment in another PR regarding modifying the existing migration for the base table. Should we do that or add a new migration for changing the column's collation?
Thank you
from short-url.
Oooh that's a good question! For similar reasons mentioned in the comment you linked to, I'd be tempted to only make the changes in existing migration. Or if there's any performant way to handle this in the package's code without touching the database (I don't know if that's possible), then I'd be open to that too 🙂
from short-url.
Hi @hari & @ash-jc-allen ,
if you are on performence issues, so i just want to give you one more thing that i saw, each generate of new key, there is 2 database query of the model exist function, i think that it need to be only once.
from short-url.
Hey @avivsalman! I'm always open to reviewing any PRs that can help to improve the performance of the package, if you fancy making one? 😄
from short-url.
Related Issues (20)
- Should store the country and city HOT 1
- redirect to url instead of throwing 404 HOT 3
- Laravel Sail Conflict Wrong IP HOT 1
- outdated v2.7 mobiledetect/mobiledetectlib in jenssegers/agent HOT 3
- Error: Class 'AshAllenDesign\ShortURL\Classes\Builder' not found HOT 1
- Prefix Null Issue HOT 10
- Laravel Jetstream compatability issue due to jenssegers/agent outdated dependency HOT 8
- db migration issue
- 如何获取真实的IP? HOT 3
- Tenancy with multi databases HOT 3
- remove prefix don't work HOT 2
- Specify the amount of uses HOT 1
- Browser information being stored as `0` (`false`) when not available in headers HOT 1
- Compatibility issue with Laravel 11 HOT 2
- [Discuss] Dropping `default_short_url` column in favor of `Accessor`
- any way to have multiple short base urls? HOT 2
- Upgrading to Laravel 11 HOT 3
- Laravel 11 compatibility HOT 2
- BindingResolutionException when trying to use lib HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from short-url.