-
Notifications
You must be signed in to change notification settings - Fork 4
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
Same js file gets included multiple times in the combined files #15
Comments
Do you use the latest source from here? Because this was fixed a while ago. |
Yeah, I have the most recent one. |
That's sad then... Do you have a multi-server setup? Can you correlate server load/the number of concurrent requests with the issue arising? |
This issue is happening in the local dev setup where there is no load balancer. Also I have used resource sets variable to not to combine a js file(say x.js) with other js files. What I have observed was, there are many minified files for the same x.js, but not combined with others. Why do I have multiple minified files for the same resource set? |
You shouldn't see this either. Do the two problems happen simultaneously? |
Yup. I have a suggestion on the way we treat the Resource Sets. Currently resource sets are matched against the static file url. My suggestion would checking resource sets against the Manifest Resource Names. This way we can create one combined file against the ResourceName and reuse it over and over. In my project, we use js files extensively. We have some common js files(say resource name as jsCommonModels which in turn depends on few other resources) used in multiple pages. So it means the many manifest resource names will have the same dependencies(jsCommonModels). As per my recommendation there will be on combined js file for jsCommonModels. It will be used in many pages along with other combined files. |
Any update on this issue, I hit this problem again :( |
I don't really understand how the feature you're suggesting relates to the bug described here. BTW if it's possible to implement this extension of resource sets in a non-breaking way (by keeping the existing functionality with URLs too) then I'd be glad to review your PR on it :-). |
What I meant was combining the js files based on resource name including its dependencies. My understanding is resources names are unique and reusuable. Aren't they? Any specific reason for js files are combined based on url? |
I understand that, it's just that I'd like to keep the current way if possible, not change it. And still I don't see how this relates to the bug you've described when opening this issue. Is it solved by what you describe? Initially the idea was that the most secure way of distinguishing between resources is to use their URLs (think about minified, CDN versions too). |
Hmm, I don't think that can cause such an issue. What could, formerly, do this, if there we concurrent requests to the same page. However I fixed this, so that shouldn't be an issue. What may happen here somehow is that concurrent requests still mess up some part of the processing... In some cases Combinator takes already processed resources and includes them as part of a new set of resources. From the top of my head this happens with multi-tenant resource sharing and maybe when using resource sets. Do you use either one of these? |
I use both of them! Do you have any suggestion to get around this issue? |
Does this still happen also locally, with just a single request executing, or in prod, where potentially multiple people access the same page with yet unprocessed resources? Also, could you show what you have for both of the configs? For the short-term if the issue is also reliably reproducible locally the obvious workaround would be to try to not use one or both of these features to see which one causes it... Because I can't reproduce this at all. |
There doesn't seem to be any issues. Can you answer my first question as well please? |
I have not seen this problem on local machine. Also this issue is a little sporadic on Azure. It is not the same screen it fails every time. |
I see, it seems like a rece condition. I remember fixing these but I don't see any sign of it... The issue is that I don't have time to deal with Combinator right now, but if you feel adventurous you could look into fixing this in CombinatorService, maybe around the ProcessCombinedResources() calls (see IDistributedLockManager in Helpful Libraries, which is already used by Combinator). |
Thanks, that helps. I will look into them. |
Hi,
I am running into an issue where the same js file gets included into the multiple combined files.
This creates some issues within my js code. This issue occurs sporadically, finding it difficult to repro this issue. Any help is appreciated.
The text was updated successfully, but these errors were encountered: